Files
simdjson-simdjson/benchmark
Francisco Geiman Thiesen 5b869f3f34 Add measured FFI overhead analysis for Rust/serde benchmarks
Previously, the FFI overhead for Rust/serde was estimated at <1%. This
commit adds proper measurement infrastructure and reveals the actual
overhead is ~10%:
- CString conversion: ~5.4% (memory copy of 82KB string)
- FFI call mechanics: ~5.5%

Changes:
- Add measure_twitter_ffi_overhead() and measure_citm_ffi_overhead()
  functions in lib.rs that measure pure serde vs FFI overhead
- Add FfiOverheadResult struct to serde_benchmark.h
- Add measure_rust_ffi_overhead() in benchmark_serialization_twitter.cpp
- Update benchmark_writeup.md with measured results and corrected claims

Key findings:
- Pure Rust serde_json: ~1,930 MB/s
- With FFI overhead: ~1,730 MB/s (as reported)
- simdjson vs pure Rust/serde: ~1.5x faster (not 2x)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 21:07:30 -08:00
..
2024-02-26 19:50:22 -05:00
2025-09-02 13:06:25 -04:00
2023-04-21 13:26:49 -04:00