Enums and Python

Brett g Porter BgPorter at NOacmSPAM.org
Wed Jun 21 13:12:26 EDT 2000


"William Dandreta" <wjdandreta at worldnet.att.net> wrote in message
news:CT545.13337$C44.783317 at bgtnsc05-> I have already had one experience
with a Python program taking 90 minutes to
> process an 18 MB file. By making what I consider minor changes in the
> program, it now takes 6 minutes.
>
> I've come to the conclusion that Python is not an inherently slow language
> but it is very easy to add overhead that makes Python programs run
extremely
> slowly. It is much more difficult to do that in the other languages that I
> use. So for the present, I am being overly cautious about adding overhead.
> As I become more familiar with Python, I'm sure that will dissippate.
...but that's true in _any_ language. The first chapter of Michael Abrash'
book "The Zen of Code Optimization" he shows a simple checksumming program
that gets a speed improvement of 50x by some very simple redesign. He shows
that attempting to 'optimize' a poor design by recoding it in assembly makes
a 'fast slow' program -- it's as fast as the design will allow, but still
slow.





More information about the Python-list mailing list