lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> On Thu, Apr 25, 2013 at 7:24 PM, leaf corcoran <leafot@gmail.com> wrote:
> > I was just trying out lpeg 0.12 with MoonScript, seems to have fixed the
> > segfault that happens in 0.11 which is great. But while testing I noticed a
> > pretty significant performance regression. It seems like lpeg 0.12 is about
> > 2 times slower than 0.10.
> 
> For the LPeg test file, v0.11 and v0.12rc2 are about 5 times slower than v0.10.

The test suite is not a typical case for performance, as it builds tons
of different patterns and use most of them once or a few times. In
particular, both v0.11 and v0.12 are expected to be slower than v0.10
for creating patterns, because they create an intermediate representation
for the pattern before compiling it. V0.11, however, should be on par
with v0.10 when matching, once the pattern is created.

v0.12 is probably slower than v0.11 (and v0.10) on match time; the
removal of the restriction of maximum size for patterns has its toll.
(That is why I was reluctant to remove it earlier; now I think the
convenience outweights the costs.)

When I get some free time, I will try to improve the performance of the
new version.

-- Roberto