Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 contemplating the Monastery: (6)
As of 2014-10-22 08:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (114 votes), past polls