Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/susisu/js-parsing-bench
https://github.com/susisu/js-parsing-bench
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/susisu/js-parsing-bench
- Owner: susisu
- Created: 2018-05-31T13:45:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-08T13:30:35.000Z (over 3 years ago)
- Last Synced: 2024-11-06T04:41:38.415Z (about 2 months ago)
- Language: JavaScript
- Size: 38.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Benchmark of parsing libraries in JavaScript
```
bin/bench ./gists.json 1000
```List of parsers:
* [loquat](https://github.com/susisu/loquat)@2.0.0, @3.0.0
* [parsimmon](https://github.com/jneen/parsimmon)@1.12.0
* [pegjs](https://github.com/pegjs/pegjs)@0.10.0
* [parjs](https://github.com/GregRos/parjs)@0.10.4
* [chevrotain](https://github.com/SAP/chevrotain)@4.3.3`gists.json` is a snapshot of https://api.github.com/gists
### Results on my computer
```
Model Name: MacBook Pro
Model Identifier: MacBookPro14,2
Processor Name: Intel Core i7
Processor Speed: 3.5 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 4 MB
Memory: 16 GB
``````
λ bin/bench ./gists.json 10000 chevrotain
Node.js version: 10.15.3
JSON file: ./gists.json
Loops: 10000
chevrotain: 12730.437msλ bin/bench ./gists.json 10000 loquat2
Node.js version: 10.15.3
JSON file: ./gists.json
Loops: 10000
loquat2: 31247.524msλ bin/bench ./gists.json 10000 loquat3
Node.js version: 10.15.3
JSON file: ./gists.json
Loops: 10000
loquat3: 31312.424msλ bin/bench ./gists.json 10000 parsimmon
Node.js version: 10.15.3
JSON file: ./gists.json
Loops: 10000
parsimmon: 49953.465msλ bin/bench ./gists.json 10000 pegjs
Node.js version: 10.15.3
JSON file: ./gists.json
Loops: 10000
pegjs: 54955.075msλ bin/bench ./gists.json 10000 parjs
Node.js version: 10.15.3
JSON file: ./gists.json
Loops: 10000
parjs: 70004.819ms
```