from Hacker News

Lark-cython lets you double the speed of Lark's LALR parser (Python)

by erezsh on 2/8/22, 11:00 PM with 2 comments

  • by jasone on 2/9/22, 1:12 AM

    I'm surprised the speedup for Lark is so small (<2X). Back in the Python 2.x days I wrote an LR(1) parser generator, and ended up porting it to Cython because it was taking several minutes to generate the parser I was working on. IIRC generation times dropped from over 3 minutes to less than 20 seconds, so ~10X speedup.