perf: use simd optimzed json string escape impl#158
Conversation
How to use the Graphite Merge QueueAdd the label merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Performance ReportMerging #158 will degrade performances by 7.69%Comparing Summary
Benchmarks breakdown
|
2a4368c to
90dff02
Compare
|
I can see |
90dff02 to
247341d
Compare
There's probably an allocation somewhere? |
247341d to
04003cd
Compare
You are absolutely right! |
04003cd to
54e2a99
Compare
54e2a99 to
5034b21
Compare
97cb467 to
e6aa0cd
Compare
ea7500d to
8ab2f7b
Compare
8ab2f7b to
dde55a1
Compare
dde55a1 to
f7848a6
Compare
Merge activity
|
benchmark results on GitHub actions runner: https://docs.rs/json-escape-simd/latest/json_escape_simd/ ### GitHub Actions x86_64 (`ubuntu-latest`) `AVX2` enabled. **RxJS payload (~10k iterations)** | Implementation | Median time | vs fastest | | --------------------- | ------------- | ---------- | | **`escape simd`** | **345.06 µs** | **1.00×** | | `escape v_jsonescape` | 576.25 µs | 1.67× | | `escape generic` | 657.94 µs | 1.91× | | `serde_json` | 766.72 µs | 2.22× | | `json-escape` | 782.65 µs | 2.27× | **Escape AFFiNE sources (~300 iterations)** | Implementation | Median time | vs fastest | | --------------------- | ------------ | ---------- | | **`escape simd`** | **12.84 ms** | **1.00×** | | `escape v_jsonescape` | 19.66 ms | 1.53× | | `escape generic` | 22.53 ms | 1.75× | | `serde_json` | 24.65 ms | 1.92× | | `json-escape` | 26.64 ms | 2.07× |
06a925c to
4a76d74
Compare

benchmark results on GitHub actions runner: https://docs.rs/json-escape-simd/latest/json_escape_simd/
GitHub Actions x86_64 (
ubuntu-latest)AVX2enabled.RxJS payload (~10k iterations)
escape simdescape v_jsonescapeescape genericserde_jsonjson-escapeEscape AFFiNE sources (~300 iterations)
escape simdescape v_jsonescapeescape genericserde_jsonjson-escape