[Ironpython-users] running asciidoc

Pawel Jasinski pawel.jasinski at gmail.com
Wed Apr 23 07:14:21 CEST 2014


asciidoc calls frequently re.compile.
In case of cpython re.compile uses cache, where ironpython performs compile
unconditionally.
https://ironpython.codeplex.com/workitem/35146
--pawel


On Mon, Apr 21, 2014 at 3:09 PM, Pawel Jasinski <pawel.jasinski at gmail.com>wrote:

>
>
>
> On Fri, Apr 18, 2014 at 12:33 PM, Jeff Hardy <jdhardy at gmail.com> wrote:
>
>> On Thu, Apr 17, 2014 at 11:32 PM, Pawel Jasinski
>> <pawel.jasinski at 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
>>
>
> The re evaluated by ipy and cpython are the same and the end result of
> ascii doc is the same but, the number of matches reported is different.
> I will keep digging.
> --pawel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20140423/614b014d/attachment.html>


More information about the Ironpython-users mailing list