E&S CVS Commit: PyProtocols - Add C speedups for range comparisons in generic functions and dispatchers.

pje at eby-sarna.com pje at eby-sarna.com
Tue Jan 25 18:19:00 EST 2005


Module Name:	PyProtocols
Committed By:	pje
Date:		Sat Jan 22 23:40:43 UTC 2005

Modified Files:
	PyProtocols/src/dispatch: strategy.py
	PyProtocols/src/protocols: _speedups.c _speedups.pyx

Log Message:
Add C speedups for range comparisons in generic functions and dispatchers.
Mainly, this speeds up the binary search part when the target value is
at the low or high end of the scale (because of comparisons with the
special 'Min' and 'Max' objects).  Performance tests appear to indicate
that Dispatcher.__getitem__ (and the nested 'get' closure) is where simple
generic functions spend most of their dispatch time, so that probably
needs to be written in C as well.  But, it should probably wait until after
I get pattern matching and variable binding figured out.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PyProtocols/src/dispatch/strategy.py.diff?r1=1.16&r2=1.17
http://cvs.eby-sarna.com/PyProtocols/src/protocols/_speedups.c.diff?r1=1.12&r2=1.13
http://cvs.eby-sarna.com/PyProtocols/src/protocols/_speedups.pyx.diff?r1=1.12&r2=1.13

To generate a diff of this commit:
cvs rdiff -r1.16 -r1.17 PyProtocols/src/dispatch/strategy.py
cvs rdiff -r1.12 -r1.13 PyProtocols/src/protocols/_speedups.c \
    PyProtocols/src/protocols/_speedups.pyx

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