Skip to content

v0.6.1

Latest

Choose a tag to compare

@NirBarak-RecoLabs NirBarak-RecoLabs released this 12 Oct 12:50
3c9c89e

Changes

Memory

  • Smaller AST nodes (#55): parser.Node shrinks from 408 to 56 bytes. Fields of compound and rare node types move to lazily allocated side structs, NodeType is a uint8 enum and the processing flags are packed into a bitfield. Every compiled expression keeps its AST, so its live heap drops by about 62% across the jsonata-js suite's expressions (2,999 → 1,140 B) and about 70% on larger real-world expressions. No public API change.

API

  • gnata.ConsArray is exported, next to OrderedMap and JSONNull, so callers that type-switch evaluation results can name the constructed array type (closes #54).

Performance

  • Compile is 28–36% faster. Some evaluation benchmarks are 1–4% slower (one extra pointer load for moved fields); the geometric mean across benchmarks is 6.7% faster with 17% fewer bytes allocated.

Tests

  • Coverage 93.8%; the jsonata-js suite passes under Go, js/wasm and the TinyGo/WASI build.