Skip to content

perf: adopt Swift 6.4 parsing optimizations - #10

Merged
vnixx merged 6 commits into
mainfrom
perf/swift64-performance-pass
Sep 17, 2026
Merged

vnixx merged 6 commits into
mainfrom
perf/swift64-performance-pass

Conversation

@vnixx

@vnixx vnixx commented Sep 17, 2026

Copy link
Copy Markdown
Member

Summary

  • require Swift tools 6.4 while keeping existing Apple deployment targets
  • centralize yyjson C-boundary reads through raw buffer/span helpers
  • avoid Data copies in byte stream chunk reads
  • add move-only JSONDocument storage with borrowed DOM traversal APIs
  • document the streaming and borrowed traversal paths

Validation

  • swift test -c release
  • /Users/qianshou/ReerJSONBenchmark: swift run -c release EncoderBench

Benchmark Notes

  • decoder paired benchmark: no material regression; Random Data improved about 3.8% across the paired runs
  • encoder final check after reverting unproven hot-path cleanup: no regression observed in encoder-only benchmark
  • borrowed JSONDocument traversal remains the main DOM win, measured around 30%+ in the earlier benchmark pass

@vnixx
vnixx merged commit b0c2199 into main Sep 17, 2026
1 check passed
@vnixx
vnixx deleted the perf/swift64-performance-pass branch September 17, 2026 07:47
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