Skip to content

cleverjam/binding-parser-rs

 
 

Repository files navigation

binding-parser-rs

An experiment to see what potential performance impacts there are for writing this binding parser in rust -> wasm

This is a pretty much a 1:1 port w/o any optimizations in place.

Benchmark in node (i9-12900k, 64GB ram)

┌─────────┬─────────────┬──────┬────────────────────┐
│ (index) │    name     │ time │     opsPerSec      │
├─────────┼─────────────┼──────┼────────────────────┤
│    0    │ 'parsimmon' │ 236  │ 131355.93220338985 │
│    1    │   'ebnf'    │ 1821 │ 17023.61339923119  │
│    2    │  'custom'   │  37  │ 837837.8378378379  │
│    3    │   'rust'    │ 145  │ 213793.10344827588 │
└─────────┴─────────────┴──────┴────────────────────┘

TODO bench it in a browser

To test it in node:

wasm-pack build --target nodejs
node --experimental-modules --experimental-wasm-modules  .\src\index.mjs

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 76.5%
  • JavaScript 23.5%