Perl code 37 times quickly than Python code??
Garry Hodgson
garry at sage.att.com
Wed Jan 16 16:04:42 EST 2002
Alex Martelli wrote:
>
> "Garry Hodgson" <garry at sage.att.com> wrote in message
> news:3C458E7E.725EA0A5 at sage.att.com...
> ...
> > if you need speed, go with a compiled language.
>
> If you need speed, code in Python. Then, benchmark, profile and
> extensively analyze the performance characteristics of your code.
> Experiment with widely different architectures. If you can still
> boil things down to irreducible CPU-bound bottlenecks, as the last
> resort recode THOSE parts only (as an extension, in C or C++) in
> the rare but possible case in which existing extensions (such as
> Numeric) cannot meet your performance needs.
>
> This would be MY advice, at least.
good advice, in general. but writing an extension is non-trivial, and
neither c nor c++ is my first choice to write in. in my case, i'm
parsing very large (gigabyte) files, and ocaml is doing so nicely
(though it still takes a half an hour or so on a big sun machine).
--
Garry Hodgson Let my inspiration flow
Senior Hacker in token rhyme suggesting rhythm
Software Innovation Services that will not forsake me
AT&T Labs 'til my tale is told and done.
garry at sage.att.com
More information about the Python-list
mailing list