Closed davidhewitt closed 1 week ago
It would probably be good to add some benchmarks before we go too much further, but I guess that can wait until after this.
I pushed a starting point for some benchmarks.
When comparing against main, these show a slight improvement from this branch:
json_contains time: [39.840 ns 40.145 ns 40.469 ns]
change: [-6.1430% -5.1358% -4.1790%] (p = 0.00 < 0.05)
Performance has improved.
json_get_str time: [55.527 ns 55.875 ns 56.233 ns]
change: [-3.8639% -2.8376% -1.6959%] (p = 0.00 < 0.05)
Performance has improved.
Found 6 outliers among 100 measurements (6.00%)
3 (3.00%) high mild
3 (3.00%) high severe
Great!
This rewrites
jiter_json_find
to avoid function calls and instead use tight loops to descend the state. Hopefully a win for both simplicity and performance.