#github #port #benchmark #com-ssbc-bipf

bipf-rs

A Rust port of https://github.com/ssbc/bipf

2 releases

0.1.1 Nov 15, 2021
0.1.0 Nov 14, 2021

#173 in #benchmark

MIT license

16KB
330 lines

bipf-rs

Rust

Rust port of https://github.com/ssbc/bipf

Benchmark (Rust vs JS)

Rust

Benchmark is as described in https://npm.io/package/@staltz/bipf

operation               ops/ms  improvement to JS

binary.encode           250     (x2.5)
serde_json.stringify    650

binary.decode           450     (x2)
serde_json.parse        316

binary.seek seek        7700    (x4)

JS

operation, ops/ms

binary.encode 96.15384615384616
JSON.stringify 555.5555555555555
binary.decode 208.33333333333334
JSON.parse 476.1904761904762
JSON.parse(buffer) 416.6666666666667
JSON.stringify(JSON.parse()) 250
binary.seek(string) 714.2857142857143
binary.seek2(encoded) 1250
binary.seek(buffer) 2000
binary.seekPath(encoded) 769.2307692307693
binary.seekPath(compiled) 1666.6666666666667
binary.compare() 1666.6666666666667

Dependencies

~1.3–1.8MB
~34K SLoC