Crates.io | rust-json-parse |
lib.rs | rust-json-parse |
version | 0.6.4 |
source | src |
created_at | 2023-04-03 15:00:20.584007 |
updated_at | 2023-06-07 23:21:10.43571 |
description | An optimized JSON parser using SIMD and an arena allocator |
homepage | https://github.com/brochweb/rust-json-parse |
repository | https://github.com/brochweb/rust-json-parse |
max_upload_size | |
id | 829150 |
size | 27,173 |
An optimized JSON parser in Rust that parses a slice &[u8]
to a JsonValue
enum. It doesn’t parse to a Rust struct.
This is a research project, it is not tested for production, but only provided as an example Rust program to optimize. Suggestions for improving reliability, speed or memory usage are welcome.
For the moment nightly-only because it relies on portable SIMD.
file | implementation | time (secs) | memory (KB) |
---|---|---|---|
tests/ascii_strings.json | rust-json-parse | 0.038 | 101184 |
tests/ascii_strings.json | serde_json | 0.097 | 120480 |
tests/ascii_strings.json | simd-json | 0.075 | 124944 |
tests/numbers.json | rust-json-parse | 0.087 | 85696 |
tests/numbers.json | serde_json | 0.109 | 126432 |
tests/numbers.json | simd-json | 0.109 | 161248 |
tests/random.json | rust-json-parse | 0.276 | 241504 |
tests/random.json | serde_json | 0.338 | 198128 |
tests/random.json | simd-json | 0.330 | 259728 |
tests/food.json | rust-json-parse | 0.003 | 2032 |
tests/food.json | serde_json | 0.004 | 2048 |
tests/food.json | simd-json | 0.003 | 2208 |
tests/geojson.json | rust-json-parse | 0.041 | 59440 |
tests/geojson.json | serde_json | 0.077 | 89296 |
tests/geojson.json | simd-json | 0.071 | 105680 |
A Broch Web Solutions project