Skip to content

Commit 85011b5

Browse files
authored
Merge pull request #195 from JairusSW/jairus/zmij
chore(bench): consolidate lazy into a dedicated access-patterns chart
2 parents 3c1e301 + 92168fb commit 85011b5

14 files changed

Lines changed: 573 additions & 1476 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,9 +572,9 @@ Re-emitting a parsed object forwards the untouched fields' raw bytes instead of
572572
<details>
573573
<summary>Access-pattern comparison (click to expand)</summary>
574574

575-
Skipping, reading one field, or forwarding is far faster than eager; reading every deferred field costs a little more (the work is deferred, not removed):
575+
Lazy cost scales with how much you actually read. For each payload (vec3 → large) the chart compares a lazy parse that reads none, one, half, or all of its deferred fields against the eager full-parse baseline. Reading nothing or a single field is far faster than eager; reading everything approaches it (the work is deferred, not removed). SWAR only, since that's the mode the lazy fast-path is showcased in:
576576

577-
<img src="https://raw.githubusercontent.com/JairusSW/json-as/refs/heads/docs/charts/lazy-access-pattern.svg" alt="Lazy access pattern: eager vs lazy">
577+
<img src="https://raw.githubusercontent.com/JairusSW/json-as/refs/heads/docs/charts/lazy-access-pattern.svg" alt="Lazy mode access patterns: deferred-field reads vs eager baseline">
578578
</details>
579579

580580
### Performance Tuning

assembly/__benches__/large.lazy.bench.ts

Lines changed: 0 additions & 192 deletions
This file was deleted.

0 commit comments

Comments
 (0)