Message174626
in response to ezio, I poked around the source here, since I've never been sure if re.compile() cached its result or not. It seems to be the case in 2.7 and 3.2 also - 2.7 uses a local caching scheme and 3.2 uses functools.lru_cache, yet we don't see as much of a slowdown with 3.2.
so it seems like the caching behavior is precedent here, but I would revert re.py's caching scheme to the one used in 2.7 if the functools.lru_cache can't be sped up very significantly. ideally lru_cache would be native.
also does python include any kind of benchmarking unit tests ? over in SQLA we have an approach that fails if the call-counts of various functions, as measured by cProfile, fall outside of a known range. it's caught many issues like these for me. |
|
Date |
User |
Action |
Args |
2012-11-03 14:31:41 | zzzeek | set | recipients:
+ zzzeek, barry, brett.cannon, rhettinger, ncoghlan, pitrou, pjenvey, ezio.melotti |
2012-11-03 14:31:41 | zzzeek | set | messageid: <1351953101.57.0.0767168270281.issue16389@psf.upfronthosting.co.za> |
2012-11-03 14:31:41 | zzzeek | link | issue16389 messages |
2012-11-03 14:31:41 | zzzeek | create | |
|