python extension, -pthreads and speed
Joseph Heled
pepster at users.sourceforge.net
Fri Apr 23 03:36:08 EDT 2004
Hi,
My python module is built using the recommended distutils.core, which
uses the -pthread flag. To my amazement this slows down the (-O3) code
by a factor of two (!2)
My gcc documentation says pthread is a PowerPC flag, but I guess this
is wrong.
Would my code fail if I drop this flag (Assuming I don't use threads
at all)?
Why would there be such a speed penalty?
Anyone can shed some light on that?
Thanks, Joseph
>python -V
Python 2.3
>gcc -v
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: ../gcc-3.3/configure : (reconfigured)
../gcc-3.3/configure --enable-languages=c,c++
Thread model: posix
gcc version 3.3
More information about the Python-list
mailing list