Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Syntactic Confectionery Delight
 
PerlMonks  

Re: optimizing the miller-rabin algorithm

by ForgotPasswordAgain (Vicar)
on May 16, 2006 at 06:54 UTC ( [id://549710]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to optimizing the miller-rabin algorithm

For any kind of optimization, you need to profile the code, for example with Devel::DProf.
  • Comment on Re: optimizing the miller-rabin algorithm

Replies are listed 'Best First'.
Re^2: optimizing the miller-rabin algorithm
by Limbic~Region (Chancellor) on May 16, 2006 at 12:39 UTC
    ForgotPasswordAgain,
    This advice reeks of cargo-cult mantra chanting. If I was doing a linear search on a sorted list, would you need to profile in order to know that a binary search would be faster? Pure algorithm analysis doesn't require machine profiling. Implementation specific details may distort things where it is warranted. Profiling is always a good rule of thumb, but it isn't always necessary. Especially when the algorithm being implemented is well known and studied. Sometimes it is just a matter of discovering you have implemented it incorrectly.

    Cheers - L~R

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://549710]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.