E&S CVS Commit: PyProtocols - Shave another 2.5 microseconds off the fast-path dispatch case, by moving

pje at eby-sarna.com pje at eby-sarna.com
Sat Feb 5 22:45:00 EST 2005


Module Name:	PyProtocols
Committed By:	pje
Date:		Sun Feb  6 03:44:27 UTC 2005

Modified Files:
	PyProtocols/src/dispatch: functions.py predicates.py

Log Message:
Shave another 2.5 microseconds off the fast-path dispatch case, by moving
locking off the fast path.  Locking is now only required when a dispatcher
has no cached tree nodes, when expanding a lazy node, and when reseeding
a node.  Also, adjust the "best split" algorithm so that it has a chance
to check dispatch IDs that it initially passed up because of prerequisites
that then turned out to be bogus (i.e., the prerequisites were irrelevant
for the current set of cases).

This is probably the last speedup for the fast-path that can be done in
Python.  Dispatcher.__getitem__ will have to become C code in order to
squeeze anything else out, I think.  Possibly DispatchNode, too.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PyProtocols/src/dispatch/functions.py.diff?r1=1.27&r2=1.28
http://cvs.eby-sarna.com/PyProtocols/src/dispatch/predicates.py.diff?r1=1.14&r2=1.15

To generate a diff of this commit:
cvs rdiff -r1.27 -r1.28 PyProtocols/src/dispatch/functions.py
cvs rdiff -r1.14 -r1.15 PyProtocols/src/dispatch/predicates.py

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