Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Sheer idle curiousity . . .

by vsespb (Hermit)
on Oct 23, 2013 at 23:01 UTC ( #1059366=note: print w/ replies, xml ) Need Help??


in reply to Sheer idle curiousity . . .

As @TheMonkWithoutVows pointed out in Re^2: Sheer idle curiousity . . ., the code

$wait = 0 unless abs($wait);
unlike other examples, never assigns anything to $wait if $wait is -34.

Proof:
my $wait = -34; $wait = 0 unless abs($wait); print $wait;
prints -34

So if you change your benchmark to
$wait = 0 if abs($wait);
you'll see, difference is small (I got 4%). (even through abs() is still used).

UPD:Oh, @TheMonkWithoutVows and you(OP) are same persons :)


Comment on Re: Sheer idle curiousity . . .
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1059366]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (16)
As of 2015-07-06 12:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (74 votes), past polls