On Thu, Feb 7, 2013 at 10:57 PM, rh <richard_hubb...@lavabit.com> wrote: > On Thu, 7 Feb 2013 18:08:00 -0700 > Ian Kelly <ian.g.ke...@gmail.com> wrote: > >> Which is approximately 30 times slower, so clearly the regular >> expression *is* being cached. I think what we're seeing here is that >> the time needed to look up the compiled regular expression in the >> cache is a significant fraction of the time needed to actually execute >> it. > > By "actually execute" you mean to apply the compiled expression > to the search or sub? Or do you mean the time needed to compile > the pattern into a regex obj?
The former. Both are dwarfed by the time needed to compile the pattern. -- http://mail.python.org/mailman/listinfo/python-list