perf(decode): parse struct destinations without the value tree
Test / test (push) Successful in 1m50s
Test / test (push) Successful in 1m50s
Assisted-by: GLM 5.3 Flash
This commit is contained in:
@@ -188,6 +188,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
**Performance**
|
||||
|
||||
- Struct destinations decode directly: for a type the direct skeleton can
|
||||
model, the parser resolves tables and keys against the struct schema while
|
||||
the document scans and no intermediate value tree is kept. The strict
|
||||
decode of the representative document drops from 168 to 160 allocations
|
||||
per call against the tree path in the same process, and the 2000-element
|
||||
document reaches allocation parity; every document the skeleton cannot
|
||||
model falls back to the tree path and its exact error contracts. A
|
||||
differential fuzz target decodes every generated document both ways.
|
||||
- Marshal writes plain scalars and typed scalar arrays straight from their
|
||||
reflect cells instead of boxing them into interface values first, and skips
|
||||
the per-element resolution for arrays that can never take the `[[header]]`
|
||||
|
||||
Reference in New Issue
Block a user