Make a small optimization to sre_compile._compile
Switch from expensive old-style-class iteration to our faster iteration. We could/should probably make old-style iteration much faster than it currently is for us (10x slower than CPython), but this is a pretty targeted change and makes compiling regular expressions much faster: it cuts (non-LLVM) _compile() time by 2x.
Showing
Please register or sign in to comment