Why is this loop heavy code so slow in Python? Possible Project Euler spoilers

Neil Cerutti horpner at yahoo.com
Mon Sep 3 01:05:11 EDT 2007


On 2007-09-02, Steven D'Aprano
<steve at REMOVE-THIS-cybersource.com.au> wrote:
> A big question mark in my mind is Lisp, which according to
> aficionados is just as dynamic as Python, but has native
> compilers that generate code running as fast as highly
> optimized C. I'm not qualified to judge whether the lessons
> learnt from Lisp can be applied to Python, but in any case Lisp
> is an old, old language -- only Fortran is older. The amount of
> development effort and money put into Lisp dwarfs that put into
> Python by possibly a hundred or more.

Lisp, as far as I know, requires type declarations, discipline,
deep knowledge of Lisp, and more than passing knowledge of your
Lisp implementation in order to generate code that's competitive
with C. On the other hand, Lisp afficionados don't have a problem
meeting those requirements. ;)

> So... if you'd like to see Python run as fast as C or Lisp, and
> you have a few tens of millions of dollars spare to invest in
> development, I think the Python Software Foundation would love
> to hear from you.

Hmmm. I have four dollars... almost five...

-- 
Neil Cerutti



More information about the Python-list mailing list