Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Sheer idle curiousity . . .

by vsespb (Chaplain)
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 :)

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 chilling in the Monastery: (5)
As of 2016-06-30 18:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (402 votes). Check out past polls.