Multithreaded Performance/Embedding

Warren L. DeLano warren at sunesis-pharma.com
Thu May 4 01:16:09 EDT 2000


I am writing a multithreaded molecular modeling program in C and Python
and I am finding a substantial difference in execution speed of the C
components (3-4X) depending on whether I embed python (fast) or import
my code in as a module (slow).  Is this normal?

Since the C-code is running as a separate thread with Python threads
unblocked, I don't see why there should be any difference in performance
-- but the difference is huge! If the python interpreter is the master
thread (vs being embedded), it seems to add a 50-75% overhead onto my
C-code execution speed.

OS: Linux, Python 1.5.2, Mesa OpenGL through XFree86/DRI with Voodoo3
hardware.

Any help would be appreciated...
Thanks,

Warren

--
mailto:warren at sunesis-pharma.com
Warren L. DeLano, Ph.D.
Informatics Scientist
Sunesis Pharmaceuticals, Inc.
3696 Haven Ave., Suite C
Redwood City, CA 94063
(650)-556-8800 fax: (650)-556-8824





More information about the Python-list mailing list