This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zzzeek
Recipients barry, brett.cannon, ezio.melotti, ncoghlan, pitrou, pjenvey, rhettinger, zzzeek
Date 2012-11-03.14:31:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1351953101.57.0.0767168270281.issue16389@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-11-03 14:31:41zzzeeksetrecipients: + zzzeek, barry, brett.cannon, rhettinger, ncoghlan, pitrou, pjenvey, ezio.melotti
2012-11-03 14:31:41zzzeeksetmessageid: <1351953101.57.0.0767168270281.issue16389@psf.upfronthosting.co.za>
2012-11-03 14:31:41zzzeeklinkissue16389 messages
2012-11-03 14:31:41zzzeekcreate