Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: computational efficiency

by BrowserUk (Pope)
on Oct 04, 2011 at 18:12 UTC ( #929624=note: print w/ replies, xml ) Need Help??


in reply to computational efficiency

Use Benchmark:

cmpthese -1, { a=>q[ $sine = rand( 2 ) - 1; $cosine = sqrt( 1 - $sine**2 ); ], b=>q[ $angle = rand( 2 *3.14159 ); $sine = sin( $angle ); $cosine = cos( $angle ); ], };; Rate a b a 1614300/s -- -28% b 2246655/s 39% --

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://929624]
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 2016-06-29 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (378 votes). Check out past polls.