Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^6: Algorithm for cancelling common factors between two lists of multiplicands

by BrowserUk (Pope)
on Aug 10, 2005 at 23:08 UTC ( #482802=note: print w/replies, xml ) Need Help??


in reply to Re^5: Algorithm for cancelling common factors between two lists of multiplicands
in thread Algorithm for cancelling common factors between two lists of multiplicands

For numbers near 2**32, factoring a prime number seems to take 150 times longer

I'm not sure that I understand this? Factoring a prime how?

(I should also admit that I don't know what a "n-order wheel" is, or why it would benefit me to use one :)

Also, as I'm limiting my inputs to 0 .. 2**32, I only need the primes upto 65537 in order to factor that range of inputs. Right now, I am trading a little space (130k) to gain speed by building an array of the first 6534 primes at compile time.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
  • Comment on Re^6: Algorithm for cancelling common factors between two lists of multiplicands

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2019-11-18 21:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (92 votes). Check out past polls.

    Notices?