SMP with Python - trying to unlock 2th CPU

Kevin Jacobs jacobs at darwin.epbi.cwru.edu
Tue Nov 21 16:26:42 EST 2000


Johannes Nix <Johannes.Nix at mail.uni-oldenburg.de> wrote:
> I am using Python on a dual processor workstation for digital audio
> processing. My programm is now processing about 1/4 real time, and I
> want to speed it up by using both processors.

If you are processing the data-stream in pure-Python, then I suggest moving
as many operations to Numeric Python or C-extensions as possible.  If you
can do 1/4 real-time now, then it won't take much to be able to do 2x-10x
realtime with judicious and fairly simple optimizations.  Further, once the
majority of work is off-loaded from the interpreter (i.e. less "pure
Python"), the global lock becomes irrelevant, since its typically released
before calling extension code.

-Kevin

-- 
----------->  Kevin Jacobs  <-----------|------->  (216) 986-0710  <--------
Informatics Consultant                  | Department of Epidemiology
Primary mail:   jacobs at theopalgroup.com |   & Biostatistics
Alternate mail: jacobs at darwin.cwru.edu  | Case Western Reserve University
----------------------------------------------------------------------------



More information about the Python-list mailing list