3 ms·
It’d be cool to parse the JSON using the same memory holding the string. Intern the object keys and it should fit
by srcreigh 4y ago
It’d be cool to parse the JSON using the same memory holding the string. Intern the object keys and it should fit
- orf 4y agoYou can do this quite nicely with serde in Rust. It’s elegant. There’s still allocations when needing to unescape values and expand the scratch space, but otherwise it’s all zero copy. You can parse at over a gigabyte a second from stdin without any real tuning.