Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Problems? Is your data what you think it is?
 
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 about the Monastery: (4)
As of 2014-04-18 08:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (464 votes), past polls