You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C++] can we use simdjson to replace rapidjson #35460
As the performance result mentioned in simdjson community: the simdjson library uses three-quarters less instructions than state-of-the-art parser RapidJSON. And the throughput of simdjson is much higher than that of rapidjson:
So can we replace rapidjson with simdjson to implement json parser?
I just want to revive this discussion again. #45459 will make RapidJson as a required dependency to parquet. However, RapidJson has been poorly maintained since 2016: Tencent/rapidjson#2321. It also seems to be a blocker to support CMake 4: #45985
For what it's worth, I think DuckDB uses yyjson, although I don't know if simdjson was considered. I seem to remember some past issues with homebrew packaging with respect to buildtime vs. runtime SIMD support (although I imagine simdjson has considered this as well!).
I seem to remember some past issues with homebrew packaging with respect to buildtime vs. runtime SIMD support (although I imagine simdjson has considered this as well!).
The simdjson library uses runtime dispatching. It is currently used by Node.js, ClickHouse and other important systems. In turn, Node.js is part of several important systems.
Optionally, we also support fancy C++20 features, and we will be integrating C++26 features (e.g., static reflection and the like) as soon as possible.
I agree we need to do something about our RapidJSON dependency. simdjson is a reasonable contender. We should just have to check it doesn't reduce the current platform compatibility (especially when SIMD isn't available/supported by simdjson).
Activity
kou commentedon May 6, 2023
If simdjson is faster than RapidJSON for our use case too, I'm OK with this.
Could you try this and share our benchmark result?
https://github.com/apache/arrow/blob/main/cpp/src/arrow/json/parser_benchmark.cc
lemire commentedon May 12, 2023
We are available to help.
Note that simdjson is used by Apache Doris and ClickHouse.
kou commentedon May 12, 2023
Great!
mapleFU commentedon May 12, 2023
Seems that writer can still use original logic, but parser can make full use of simdjson?
kou commentedon May 12, 2023
Is there any merit to use both RapidJSON and simdjson?
I think that using either RapidJSON or simdjson will reduce our maintenance cost.
[-]can we use simdjson to replace rapidjson[/-][+][C++] can we use simdjson to replace rapidjson[/+]pitrou commentedon May 24, 2023
Agreed with @kou , we probably want to avoid depending on two different JSON libraries.
Interested people should try working on a PR.
pitrou commentedon May 24, 2023
I'm skeptical switching to simdjson would improve performance a lot, btw. Parsing is only a small part of the work necessary to convert JSON to Arrow.
wgtmac commentedon Apr 11, 2025
I just want to revive this discussion again. #45459 will make
RapidJsonas a required dependency to parquet. However, RapidJson has been poorly maintained since 2016: Tencent/rapidjson#2321. It also seems to be a blocker to support CMake 4: #45985kou commentedon Apr 11, 2025
Let's try simdjson for better maintainability!
paleolimbot commentedon Apr 11, 2025
For what it's worth, I think DuckDB uses yyjson, although I don't know if simdjson was considered. I seem to remember some past issues with homebrew packaging with respect to buildtime vs. runtime SIMD support (although I imagine simdjson has considered this as well!).
lemire commentedon Apr 11, 2025
The simdjson library uses runtime dispatching. It is currently used by Node.js, ClickHouse and other important systems. In turn, Node.js is part of several important systems.
Optionally, we also support fancy C++20 features, and we will be integrating C++26 features (e.g., static reflection and the like) as soon as possible.
Suggested reference:
Documentation: https://github.com/simdjson/simdjson/blob/master/doc/basics.md
pitrou commentedon Apr 16, 2025
I agree we need to do something about our RapidJSON dependency. simdjson is a reasonable contender. We should just have to check it doesn't reduce the current platform compatibility (especially when SIMD isn't available/supported by simdjson).
64 remaining items
rok commentedon Aug 25, 2026
@Reranko05 on main we're getting this:
Is this something one of these issues will address or should we open a new one?
pitrou commentedon Aug 25, 2026
There's a PR open at #50900 but I don't think it's a good solution - see comments.
Edit: and it seems the corresponding issue is #50859
Reranko05 commentedon Aug 25, 2026
@Krishnanand-G is working on the issue, we can try the approach suggested by @pitrou #50900 (comment)
Merge branch 'main' into apachegh-35460-integration2
Merge branch 'main' into apachegh-35460-parser
Merge branch 'main' into apachegh-35460-parser