3 ms·
LPEG matching from 75s down to 100ms
- jdesgats 12y agoAuthor here. This blog series articles introduces some experimental changes that I made into LPeg for a specific use case: matching many alternative patterns while keeping flexibility when needed. Don't expect huge optimizations on general case. I still need to write the last part with detailed benchmarks. Stay tuned ! Here is some more links about this little project: Blog article, Part 1: http://mille337.net/index.php?d=2015/02/22/14/28/35-lets-optimize-lpeg---part-1-introduction http://mille337.net/index.php?d=2015/02/22/14/28/35-lets-opt... Blog article, Part 2: http://mille337.net/index.php?d=2015/02/22/15/26/40-lets-optimize-lpeg---part-2-ast-transformation http://mille337.net/index.php?d=2015/02/22/15/26/40-lets-opt... Lua ML announce: http://lua.2524044.n2.nabble.com/LPeg-pattern-optimizer-td7665935.html http://lua.2524044.n2.nabble.com/LPeg-pattern-optimizer-td76... GitHub fork: https://github.com/jdesgats/lpeg https://github.com/jdesgats/lpeg