[issue2636] Regexp 2.6 (modifications to current re 2.2.2)

Jeffrey C. Jacobs report at bugs.python.org
Fri Apr 18 15:38:58 CEST 2008


Jeffrey C. Jacobs <timehorse at users.sourceforge.net> added the comment:

Here are the modification so far for item 9) in _sre.c plus some small
modifications to sre_constants.h which are only to get _sre.c to
compile; normally sre_constants.h is generated by sre_constants.py, so
this is not the final version of that file.  I also would have intended
to make SRE_CHARSET and SRE_COUNT use lookup tables, as well as maybe
others, but not likely any other lookup tables.  I also want to remove
alloc_pos out of the self object and make it a parameter to the ALLOC
parameter and probably get rid of the op_code attribute since it is only
used in 1 place to save one subtract in a very rare case.  But I want to
resolve the 10% problem first, so would appreciate it if people could
look at the REMOVE_SRE_MATCH_MACROS section of code and compare it to
the non-REMOVE_SRE_MATCH_MACROS version of SRE_MATCH and see if you can
suggest anything to make the former (new code) faster to get me that
elusive 10%.

----------
keywords: +patch
Added file: http://bugs.python.org/file10052/issue2636-09.patch

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2636>
__________________________________


More information about the Python-bugs-list mailing list