Code speedup tips

Frank Buss fb at frank-buss.de
Sun Mar 9 19:21:24 CET 2003


Alex Martelli <aleax at aleax.it> wrote:

> My machine and yours seem to have similar speed -- for 5000
> arrays of 10000 ones each:
> 
> 47.10 lambdareduce
> 30.85 addreduce
> 11.32 count1s
> 0.33 sum

Thanks, sum is great! It took 3 seconds on my machine, but I stopped the 
time of the whole program. So Python has a data thruput of over 16 MB per 
second on my 1.5 GHz Pentium 4. Looks like it is good suited for my CAs 
(http://www.frank-buss.de/automaton/). Perhaps I should do more with it, at 
least for interactive experiments.

Currently most of it is implemented in Java, because it's easier for the 
user to open it in their browsers, without the need to load and to install 
a Python environment (and all additional required Python packages) first.

-- 
Frank Buß, fb at frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de




More information about the Python-list mailing list