Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 lurking in the Monastery: (8)
As of 2014-08-30 17:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls