Commit Graph

3144 Commits

Author SHA1 Message Date
Francisco Geiman Thiesen 56fce57bf1 Fix CITM benchmark to match CitmCatalog struct definition
- rapidjson_citm_catalog_data.h: Remove references to non-existent
  fields (areaNames, topicNames, venueNames, etc.) and properly handle
  std::optional fields with value checks before dereferencing

- benchmark_parsing_citm.cpp: Fix CITMPrice field names from abbreviated
  form (audience, seat) to actual struct names (audienceSubCategoryId,
  seatCategoryId) in nlohmann, rapidjson, and yyjson parsing code
2026-01-28 20:00:45 -08:00
Francisco Geiman Thiesen 5f6b6e1077 Update benchmark writeup authors
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 21:30:54 -08:00
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
Francisco Geiman Thiesen dbbb5ea7f1 Add comprehensive benchmark writeup for research publication
This document provides research-grade analysis of JSON serialization
benchmarks comparing simdjson's C++26 reflection-based serialization
against competing libraries (nlohmann, yyjson, Rust/serde, reflect-cpp).

Contents:
- Hardware/software environment details
- Library versions and compilation settings
- Detailed methodology with timing infrastructure code
- Per-library implementation analysis with code snippets
- Output equivalence verification tables
- Consolidated results with variance from multiple runs
- Threats to validity section
- Reproducibility instructions

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 13:01:20 -08:00
Francisco Geiman Thiesen 5ec407037d Include buffer reuse variants in main benchmark tables
simdjson was designed for buffer reuse, so showing both variants:
- Buffer reuse: realistic production performance (~12-13% faster)
- Fresh allocation: fair comparison with other libraries
2025-12-18 12:42:15 -08:00
Francisco Geiman Thiesen a5e37f77ea Update benchmark_fairness.md with yyjson CITM results 2025-12-18 12:35:52 -08:00
Francisco Geiman Thiesen 0d254a20e0 Add yyjson to CITM serialization benchmark
- Update yyjson serialization to match C++ CitmCatalog struct (only events + performances)
- Add yyjson include and benchmark function to CITM serialization
- Link yyjson to CITM serialization benchmark in CMakeLists.txt
- Output size matches other libraries: 496,682 bytes
2025-12-18 12:35:35 -08:00
Francisco Geiman Thiesen 71fc498e50 Update benchmark_fairness.md with corrected CITM numbers 2025-12-17 21:12:28 -08:00
Francisco Geiman Thiesen 8c541ec3aa Fix CITM bench_simdjson_to to use same API as Twitter benchmark
The CITM benchmark was using simdjson::to_json_string() while Twitter
used simdjson::builder::to_json(). This caused misleading results
(532 MB/s vs 2780 MB/s). Now both use the same API for consistency.
2025-12-17 21:12:05 -08:00
Francisco Geiman Thiesen 2c4834f75c Address benchmark fairness concerns for academic publication
Memory Allocation Fairness:
- Add "fair" benchmark variants that allocate fresh buffers each iteration
- Add "reuse" variants showing optimized API potential with buffer reuse
- Fair variants match allocation behavior of competing libraries

Rust/serde CITM Fix:
- Rewrite Rust CitmCatalog struct to match C++ exactly
- Now only serializes events + performances (matching C++ behavior)
- Output size now matches: 496,682 bytes for all libraries

Documentation:
- Add comprehensive benchmark_fairness.md report
- Document reflect-cpp output size discrepancy (optional field handling)
- Document Rust FFI overhead (negligible for this data size)
- Include reproducibility instructions

Results after fixes:
- Twitter: All libraries produce identical 81,927 byte output
- CITM: simdjson/nlohmann/Rust all produce 496,682 bytes
- CITM reflect-cpp: 476,270 bytes (documented optional handling difference)
2025-12-17 14:07:06 -08:00
Francisco Geiman Thiesen 858006fe0e Fix benchmark configuration for Rust/serde and yyjson
- Fix typo: SIMDJSON_USER_RUST -> SIMDJSON_USE_RUST in CMakeLists.txt
- Update unified_benchmark.sh to use correct SIMDJSON_USE_RUST flag
- Add yyjson to Twitter serialization benchmark
- Fix CITM catalog field names to match JSON keys (audienceSubCategoryId, seatCategoryId)
- Fix CMake target names for yyjson and rapidjson in CITM benchmark
2025-12-15 20:23:16 -08:00
Francisco Geiman Thiesen 2a481a4124 Merge master into francisco/ablation_study
Resolved conflicts in:
- include/simdjson/generic/ondemand/json_builder.h
- include/simdjson/generic/ondemand/json_string_builder-inl.h
- include/simdjson/generic/ondemand/std_deserialize.h

Conflict resolution strategy:
- Preserved ablation study infrastructure (SIMDJSON_ABLATION_* macros)
- Integrated master's improvements:
  - Use constevalutil:: namespace for consteval functions
  - Added require_custom_serialization constraints
  - Added constexpr qualifiers to functions
  - Updated reflection API to use access_context::unchecked()
  - Improved optional member handling in deserialization
2025-12-15 16:05:14 -08:00
Daniel Lemire 7987418b1f adding the official simdjson logo files 2025-12-13 12:14:40 -05:00
Daniel Lemire 5e871f6724 improving slightly the documentation. 2025-12-12 19:04:34 -05:00
Daniel Lemire 5d16fd5f31 4.2.3 v4.2.3 2025-12-12 17:51:39 -05:00
Jake S. Del Mastro 4e9ff03af5 Make it possible to provide custom serializers for range types ( (#2550)
If you provide a custom serializer for range types it is currently never used due to the requires clause for string_builder::append with ranges is overly broad
2025-12-12 17:50:52 -05:00
Daniel Lemire aa7489060a Fix typo in bug report template 2025-12-12 15:24:48 -05:00
Daniel Lemire ae32422891 a few additional tests and removing a bad remark in the documentation... 2025-12-03 19:35:18 -05:00
Liqiang TAO 667d0ed3c7 make code branchless (#2546) 2025-11-18 16:57:06 -05:00
Daniel Lemire b1c31b428d update v4.2.2 2025-11-11 14:21:04 -05:00
Daniel Lemire 56ac56ba32 Merge branch 'master' of github.com:simdjson/simdjson 2025-11-11 14:17:08 -05:00
Muhammad Rizal Nurromdhoni 19549c60ec string_builder range-based append fix (#2544)
* Use std::ranges::range_value_t on range

* Add ranges test
2025-11-11 14:15:00 -05:00
Daniel Lemire 16e99f229b Update iterate_many.md for clarity on JSON processing
Clarified the example JSON format and emphasized the need for efficient processing.
2025-11-10 13:49:13 -05:00
Liqiang TAO 21342a4142 Fix some wrong content in doc (#2542) 2025-11-10 11:24:38 -05:00
Daniel Lemire d0e841d3e9 Release Candidate 4.2.2 (#2539)
* adding documentation.

* release candidate
2025-11-06 12:00:21 -05:00
Daniel Lemire a962652ec3 adding documentation. 2025-11-05 11:42:38 -05:00
hiteshmk05 77d73b068a add: windows wstring support for padded_str (#2537)
* add: windows wstring support for padded_str

* add: padded_string::load for wstring windows

* fix: extra space

* change: file path
2025-11-05 11:29:30 -05:00
Daniel Lemire 19ff7a572d adding concept examples to the compile-time JSON. (#2538) 2025-11-04 15:06:40 -05:00
Daniel Lemire 235dbc5369 4.2.1 v4.2.1 2025-11-03 11:04:23 -05:00
Daniel Lemire 2b9c8977af using _json for compile-time JSON strings. (#2536) 2025-11-03 11:03:21 -05:00
Daniel Lemire 3d87bd4abc release 4.2.0 v4.2.0 2025-11-02 16:19:39 -05:00
hiteshmk05 a60c0d1e39 fix: cmake error when CMAKE_CXX_FLAGS is empty (#2535) 2025-11-02 11:53:56 -05:00
Francisco Geiman Thiesen 86bfbaada7 Merge pull request #2534 from simdjson/francisco/compile-time-parsing_daniel
Compile-time parsing (C++26)
2025-11-01 22:19:37 -07:00
Daniel Lemire ccac6403d9 fixing support for pre-C++17 2025-11-01 17:28:17 -04:00
Daniel Lemire aade58c3dc tweaks 2025-11-01 17:08:03 -04:00
Daniel Lemire 3319815e25 bringing back compatibility with pre-C++17 2025-11-01 16:46:34 -04:00
hiteshmk05 a24f845bd7 Feature/ondemand wildcard support (#2533)
* Add feature for ondemand-wildcard-JSONQueries

* fix wildcard_test

* fix: extra whitespace
2025-11-01 16:46:08 -04:00
Daniel Lemire 212e2d5857 removing unnecessary changes 2025-10-31 18:56:23 -04:00
Daniel Lemire 547e156e33 update 2025-10-31 18:54:04 -04:00
Daniel Lemire 98a45f7229 fix 2025-10-31 18:48:49 -04:00
Daniel Lemire 8589509d1e Merge branch 'master' into francisco/compile-time-parsing_daniel 2025-10-31 18:47:42 -04:00
Daniel Lemire 2fce4a843d update 2025-10-31 18:46:13 -04:00
Daniel Lemire 62803512e4 saving. 2025-10-31 15:58:51 -04:00
Daniel Lemire 76d9dee854 update 2025-10-31 00:13:00 -04:00
Daniel Lemire bf15f21b0b not great but a start. 2025-10-29 20:10:06 -04:00
Daniel Lemire 32b301893c updating toc 2025-10-29 09:53:39 -04:00
Daniel Lemire 7f1531a1f9 removing garbage. 2025-10-29 09:53:13 -04:00
Daniel Lemire 0a3b555ff7 Merge branch 'master' of github.com:simdjson/simdjson 2025-10-29 09:50:15 -04:00
Daniel Lemire 114d45ad54 some garbage 2025-10-29 00:07:48 -04:00
Daniel Lemire 0112be86b0 4.1.0 (#2532) v4.1.0 2025-10-28 00:10:59 -04:00