Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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


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; }


Comment on Re: (tye)Re: Benchmarking the basic operations
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://54363]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2015-07-30 03:41 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (269 votes), past polls