dabeaz / sly

Sly Lex Yacc
Other
817 stars 108 forks source link

Benchmarking a JSON parser #52

Closed goodmami closed 3 years ago

goodmami commented 4 years ago

I've written a JSON parser in SLY for the purpose of benchmarking against other parsing libraries (including another LALR parser, Lark, and some PEG-like parsers: pyparsing, parsimonious, pe). The repo is here: https://github.com/goodmami/python-parsing-benchmarks

The README has the results for a run on CPython and on PyPy (for both, the mean time for 5 rounds of parsing a ~5MB JSON file). The code for SLY is here: https://github.com/goodmami/python-parsing-benchmarks/blob/master/bench/sly/json.py

I'm the author of one other library (pe), and I want the benchmarks to be fair, so my question is:

Regarding the code, a couple of things to note:

Thanks for any help!

goodmami commented 3 years ago

Closing since nobody has responded in a year and this issue isn't actually a bug or feature request for SLY.