Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: (tye)Re: Benchmarking the basic operations

by chipmunk (Parson)
on Jan 26, 2001 at 01:12 UTC ( #54363=note: print w/replies, xml ) Need Help??


in reply to (tye)Re: Benchmarking the basic operations
in thread Benchmarking the basic operations

Quote:
Yes, then we could make our programs run faster with:
if( $^O =~ /^MSWin/ ) { $comp= $b gt $a; } else { $comp= $a lt $b; }
Well, you must not have done the actual benchmark. I did, and I found that on MSWin32, it's gt that is faster, not lt. So the correct way to optimize this comparison is:
if ($^O =~ /^MSWin/) { $comp= $a gt $b; } else { $comp= $b lt $a; }

;)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://54363]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2016-12-09 15:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (152 votes). Check out past polls.