On Wed, Feb 25, 2015 at 11:57 AM, Michael Orlitzky <mich...@orlitzky.com> wrote: > On 02/25/2015 02:10 PM, William Stein wrote: >> >> toys.eratosthenes() >> >> or possibly eratosthenes_toy()... >> > > In this case, the name refers to the implementation, not the > functionality, so I don't think it's a big deal. It's not a "prime > number routine" that just happens to be slow -- it's the sieve of > Eratosthenes, running as fast as it can.
> Any other implementation will be just as slow. I'm not sure I agree. This eratosthenes function is pure Python code. It would probably be 100 times faster if rewritten in Cython using int's or long's. In fact, this is (more or less) the canonical first example of a function that benefits directly from being compiled rather than pure Python -- it's the first example on the Pyrex page: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/ That you would think "it's the sieve of Eratosthenes, running as fast as it can. Any other implementation will be just as slow" is in fact to me a very strong argument for why it *should* have toy in the name. Since if it did, it's highly unlikely you would think it is "running as fast as it can". William -- William (http://wstein.org) -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.