E&S CVS Commit: PEAK - Removed memoization from 'fmtparse': empirical testing showed that the

pje at eby-sarna.com pje at eby-sarna.com
Sun Aug 15 20:18:01 EDT 2004


Module Name:	PEAK
Committed By:	pje
Date:		Mon Aug 16 00:17:47 UTC 2004

Modified Files:
	PEAK/src/peak/naming: URL.py
	PEAK/src/peak/util: fmtparse.py

Log Message:
Removed memoization from 'fmtparse': empirical testing showed that the
cache hit rate was incredibly low: only 18 hits in the entire PEAK test
suite.  Analysis suggests that only grammars having alternatives with
similar prefixes are likely to actually receive any benefit from
memoization.  By contrast, URLs and other simple, structural syntaxes of
the kind 'fmtparse' is intended for, almost never require backtracking,
and therefore don't really need the memoization.  Removing the memoization
and related code appears to shave almost a tenth of a second off the test
suite's run time.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PEAK/src/peak/naming/URL.py.diff?r1=1.18&r2=1.19
http://cvs.eby-sarna.com/PEAK/src/peak/util/fmtparse.py.diff?r1=1.14&r2=1.15

To generate a diff of this commit:
cvs rdiff -r1.18 -r1.19 PEAK/src/peak/naming/URL.py
cvs rdiff -r1.14 -r1.15 PEAK/src/peak/util/fmtparse.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