On Thu, Apr 17, 2014 at 11:32 PM, Pawel Jasinski <pawel.jasin...@gmail.com> wrote: > I think it is simple .net regex which is slower. > I did the following: > 1. Proved that asciidoc run under python (cygwin) evaluates the same regular > expression as under ipy - there are no bugs which make ipy evaluate more REs > 2. Captured the evaluated regular expressions in a form suitable for .net > and python > 3. Write trivial program in c# to evaluate captured REs. (6 seconds) > 4. Write trivial program in python to evaluate captured REs (0.4s for > python3.2 and 0.65s for python 2.7.5) > I also got rid off ipy/c# quirks (extra named groups), to get functional > equivalent and no conversion overhead - no change > Number of captured REs is 46253. > For this particular sample, cpython implementation if regular expression > appears to be 12 times faster than .net implementation
Can you put the sample code in a gist? Maybe it's hitting a pathological case in the .NET regex engine or something, because that's a crazy difference. - Jeff _______________________________________________ Ironpython-users mailing list Ironpython-users@python.org https://mail.python.org/mailman/listinfo/ironpython-users