On Wed, Apr 23, 2014 at 9:34 AM, Jeff Hardy <jdha...@gmail.com> wrote:
> On Wed, Apr 23, 2014 at 6:14 AM, Pawel Jasinski > <pawel.jasin...@gmail.com> wrote: > > asciidoc calls frequently re.compile. > > In case of cpython re.compile uses cache, where ironpython performs > compile > > unconditionally. > > https://ironpython.codeplex.com/workitem/35146 > > Why would it repeatedly call compile? The point of compile is that it > should only be called once and then the result re-used. > > - Jeff > I have no idea. It doesn't look right. Sometimes it has the same pattern for different macros, so there is a valid reason to do so, but in general it is almost always blindly calling compile before any evaluation. There is something else I have noticed. cpython always compiles. Ironpython compiles only if compile is called. The patch I have submitted (https://github.com/IronLanguages/main/pull/191) is trying to be clever about it. Any direct method does cache, but it does not compile (compile is expensive, I learned it hard way :-) Compile does cache, but if the cached version is not compiled, it gets replaced with compiled one. asciidoc running with patched version of ironpython performs reasonably. --pawel
_______________________________________________ Ironpython-users mailing list Ironpython-users@python.org https://mail.python.org/mailman/listinfo/ironpython-users