In article <mailman.527.1274527722.32709.python-l...@python.org>,
Tim Chase  <python.l...@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 (a...@pythoncraft.com)           <*>         http://www.pythoncraft.com/

f u cn rd ths, u cn gt a gd jb n nx prgrmmng.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to