A JSON Parser was implemented using each of these Parsing Libraries (Generators/Combinators/DSLs):
These are hand-built JSON parsers to compare against generic generators/libraries/DSLS
The JSON Grammar was used because it is simple to implement, simple to compare and is often already available as a sample grammar for most parsing tools.
See the benchmark methodology for details on what is being tested and how.
The Chevrotain and Antlr Libraries can either produce a Parse Tree (with Visitor / listener) or use embedded actions in the grammar. Thus they are measured in both scenarios ("-PT" means Parse Tree variant).
Benchmarking is done using the benchmark.js library.
The entire source code for this benchmark can be found in this github repository.