Python Performance vs. C++ in a Complex System

Dan Maas dmaas at nospam.dcine.com
Sun Apr 15 18:21:39 EDT 2001


> I've been recently working on a agent-based simulation system which is
> intended to run with massive numbers of threads in the 15,000-30,000
> range. 

Thanks for the data points! You've probably considered this already, but
switching to a state-machine model with fewer (1?) kernel-level threads
may give you massive speed gains. Most kernels (especially Linux) perform
very poorly when the # of active threads exceeds the # of CPUs by a large
amount. (in fact, if you are on Linux, I also encourage you to try out some of
the patches people have developed to increase the scalability of the
scheduler - currently it is O(n) in the # of runnable proceses - check 
the Linux Kernel Mailing List archives...)

Regards,
Dan



More information about the Python-list mailing list