E&S CVS Commit: PEAK - Major speedup for module inheritance, thanks to Pyrex! The 'codeIndex()'

pje at eby-sarna.com pje at eby-sarna.com
Thu Nov 28 18:45:01 EST 2002

Module Name:	PEAK
Committed By:	pje
Date:		Thu Nov 28 23:44:26 UTC 2002

Modified Files:
	PEAK: setup.py
	PEAK/src/Persistence: .cvsignore
	PEAK/src/peak/config: modules.py
Added Files:
	PEAK/src: .cvsignore
	PEAK/src/peak/util: .cvsignore _Code.c _Code.pyx

Log Message:
Major speedup for module inheritance, thanks to Pyrex!  The 'codeIndex()'
object and associated iterators are now in C, and the speedup is quite
visible.  It's still not as fast as I'd like, but the next step would be
to rewrite 'prepForSimulation()' in Pyrex, and it's a lot more complex
than the 'codeIndex' class.  Unfortunately, you can't just copy your code
into a .pyx file and expect a speedup; you have to think in C even if
the syntax is Pythonic.  Nonetheless, module inheritance spent so much
time in the old 'codeIndex.__init__' method that it was worth the hour or
two it took to convert.

Added support for Pyrex.Distutils to automatically build from .pyx; if
you're using 'mingw32' and Greg hasn't released my fixes yet, you may want
to edit setup.py to force it to compile from .c files instead and run
'pyrexc' manually against the '.pyx' files.  If you want to tinker with
the 'pyx' source files, you'll want to install Pyrex 0.4.6 or better.

To view diffs of this commit, you can use the following URL(s):

To generate a diff of this commit:
cvs rdiff -r1.39 -r1.40 PEAK/setup.py
cvs rdiff -r0 -r1.1 PEAK/src/.cvsignore
cvs rdiff -r1.1.1.1 -r1.2 PEAK/src/Persistence/.cvsignore
cvs rdiff -r1.7 -r1.8 PEAK/src/peak/config/modules.py
cvs rdiff -r0 -r1.1 PEAK/src/peak/util/.cvsignore PEAK/src/peak/util/_Code.c \

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

More information about the source-changes mailing list