E&S CVS Commit: PyProtocols - Shave another .8+ microseconds out, while still in Python. It seems that

pje at eby-sarna.com pje at eby-sarna.com
Sat Feb 5 23:24:01 EST 2005


Module Name:	PyProtocols
Committed By:	pje
Date:		Sun Feb  6 04:23:59 UTC 2005

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

Log Message:
Shave another .8+ microseconds out, while still in Python.  It seems that
modifying variables referenced by an enclosed function is slower, even if
the nested function is never even created, let alone invoked.  This makes
sense, of course, but I didn't realize it would be measurable.  However,
because the variables referenced by the nested function were set four times
and accessed two, the total time apparently adds up to around .8uS.  Of
course, this change slows down expression calculation, but it will get
sped back up via C at some point, along with the rest of the fast path.


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.28&r2=1.29

To generate a diff of this commit:
cvs rdiff -r1.28 -r1.29 PyProtocols/src/dispatch/functions.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