Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parser.rl: initialize the buffer with 512B on the stack
This very significantly reduce the overhead on smaller benchmarks ``` == Parsing small hash (65 bytes) ruby 3.3.4 (2024-07-09 revision be1089c8ec) [arm64-darwin23] Warming up -------------------------------------- json 304.417k i/100ms oj 219.431k i/100ms oj strict 254.532k i/100ms Oj::Parser 431.309k i/100ms rapidjson 281.703k i/100ms Calculating ------------------------------------- json 3.046M (± 0.1%) i/s (328.25 ns/i) - 15.525M in 5.096243s oj 2.225M (± 0.2%) i/s (449.50 ns/i) - 11.191M in 5.030429s oj strict 2.553M (± 0.5%) i/s (391.75 ns/i) - 12.981M in 5.085538s Oj::Parser 4.280M (± 0.8%) i/s (233.64 ns/i) - 21.565M in 5.038834s rapidjson 2.826M (± 0.3%) i/s (353.83 ns/i) - 14.367M in 5.083480s Comparison: json: 3046420.8 i/s Oj::Parser: 4280132.7 i/s - 1.40x faster rapidjson: 2826209.4 i/s - 1.08x slower oj strict: 2552619.7 i/s - 1.19x slower oj: 2224670.7 i/s - 1.37x slower ```
- Loading branch information