ANN: Pyrex - a language for writing Python extension modules

David Eppstein eppstein at ics.uci.edu
Mon Apr 8 02:23:27 EDT 2002


In article <3CB13147.89F02706 at cosc.canterbury.ac.nz>,
 Greg Ewing <greg at cosc.canterbury.ac.nz> wrote:

> > Not to criticise your project, but this is not a good example to use --
> > you've started with a very unnecessarily slow algorithm.
> 
> The point of the example isn't to show how to find prime numbers 
> quickly. It's just a representative CPU-intensive task that 
> demonstrates what Pyrex can achieve. Using a more efficient algorithm 
> wouldn't make that point any more effectively.

But I think your example makes a different point even more effectively: 
if you're having speed bottlenecks that would cause you to want to use 
Pyrex or similar extension modules, you can often do a lot better by 
instead applying some thought and using a better algorithm.

If you're using algorithms that are as efficient as you can make them 
and still not getting enough speed, that may be the time to start using 
extension modules.

-- 
David Eppstein       UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/



More information about the Python-list mailing list