Efficient python programming...

Emile van Sebille emile at fenx.com
Thu Jun 6 21:25:01 CEST 2002


Shagshag13
>  I'm looking for any state of art, optimizing techniques, tips, that a
> python beginner couldn't know by itself, but should learn and
> would be aware to write "efficient and good looking"python's code...
>
>  (not the kind of thing which made you an obfuscated python nerd,
> but that "map" should be preferred to "for in loop" if possible, that
> dictionary are very well optimized, etc.)
>

I think the advise you'll generally get is to write first, then profile,
then optimize where needed.  Those optimizations may well involve using
map, or numpy, or c-extensions, etc...  But emphasis on optimization
first is probably time mis-spent.

--

Emile van Sebille
emile at fenx.com

---------




More information about the Python-list mailing list