Skip to content

docs: document WASM context serialization optimizations and updated benchmarks#69

Merged
aepfli merged 1 commit into
mainfrom
docs/update-optimization-benchmarks
Feb 12, 2026
Merged

docs: document WASM context serialization optimizations and updated benchmarks#69
aepfli merged 1 commit into
mainfrom
docs/update-optimization-benchmarks

Conversation

@aepfli
Copy link
Copy Markdown
Contributor

@aepfli aepfli commented Feb 10, 2026

Summary

  • Document the three WASM context serialization optimizations in both READMEs: pre-evaluation cache, context key filtering, and index-based evaluation
  • Add evaluate_by_index and evaluate_reusable to the main README's exported functions table
  • Update update_state response format with new fields (requiredContextKeys, flagIndices, preEvaluated)
  • Replace outdated benchmark numbers with current JMH results showing 32x speedup for targeting flags with 1000+ attribute contexts
  • Update Java API reference with EvaluationContext overload and UpdateStateResult fields

Key benchmark results (JMH, 1000+ attribute LayeredEvaluationContext)

Scenario Old json-logic-java WASM Evaluator Speedup
Simple flag (cached) 0.023 µs 0.020 µs ~same
Targeting match 409 µs 12.8 µs 32x
Many evals (×1000) 409 µs 11.9 µs 34x

Test plan

  • No code changes — documentation only
  • Verified all benchmark numbers match actual JMH output

🤖 Generated with Claude Code

…ated benchmarks

Update both READMEs to reflect the WASM context serialization optimizations:

- Document evaluate_by_index and evaluate_reusable WASM exports
- Update update_state response format with new fields (requiredContextKeys,
  flagIndices, preEvaluated)
- Replace outdated benchmark numbers with current JMH results showing 32x
  speedup for targeting flags with large contexts
- Document the three-tier optimization pipeline (pre-evaluation cache,
  context key filtering, index-based evaluation)
- Update Java API reference with EvaluationContext overload and
  UpdateStateResult fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@aepfli aepfli merged commit 53f2cb7 into main Feb 12, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant