How to make python run faster

J Sisson sisson.j at gmail.com
Mon Apr 14 15:40:57 EDT 2008


2008/4/14 <lbonafide at yahoo.com>:

> On Apr 14, 8:48 am, 一首诗 <newpt... at gmail.com> wrote:
>
> > But, it is still not as fast as 1.
>
>
> So if speed is the #1 design goal, use pure C.  If not, develop in
> pure Python and, if the application is too slow, profile the code and
> look for bottlenecks that can be optimized.  There's a good chance
> that they can be resolved algorithmically, not by simply dropping down
> to C.
> --
> http://mail.python.org/mailman/listinfo/python-list
>

Profiling python code can help spot bottlenecks that would *still be
bottlenecks* if translated directly to C, so I definitely agree here...given
a big enough problem space, a bad algorithm will run slow(er) regardless of
language or hardware.

-- 
Computers are like air conditioners...
They quit working when you open Windows.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080414/6e43bd7a/attachment-0001.html>


More information about the Python-list mailing list