On Sat, Mar 23, 2013 at 01:38:19PM +0100, "M.-A. Lemburg" mal@egenix.com wrote:
Wouldn't it make sense to add a way to pickle or marshal compiled REs ?
The precompiled REs could then be loaded directly from the pickle, avoiding the compiling overhead on startup.
But with an overhead of opening files and unpickling. My wild guess [not backed by numbers] is that it would be as slow.
I suspect the only way to speedup things would be to precompile regexps at compile (generating .pyc) time and saving compiled regexps in the byte code file.
Oleg.