where are the program that are written in python?

Aahz aahz at pythoncraft.com
Sat May 22 11:09:05 EDT 2010


In article <mailman.527.1274527722.32709.python-list at python.org>,
Tim Chase  <python.list at tim.thechases.com> wrote:
>
>I'd also include that a change in algorithm can be a big help for      
>speeding up CPU-bound code.  It doesn't matter much if you're using    
>Python or hand-coding that inner loop in C/ASM, if you're using a      
>O(2^N) algorithm.                                                      

Rewriting an algorithm also helps I/O-bound code when you're doing
something stupid like querying a DB multiple times for each record
instead of caching the result.  Also, rewriting your algorithm to just
pull the entire DB into RAM helps, too.  (If you know your dataset must
fit into RAM, anyway, in order to process your algorithm.)
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

f u cn rd ths, u cn gt a gd jb n nx prgrmmng.



More information about the Python-list mailing list