GH-35460: Introduce simdjson and migrate ObjectParser#50469
Conversation
|
|
|
@kou As we discussed, I've started working on the RapidJSON → simdjson migration and will try to split it into small, reviewable PRs. This PR is the first step, introducing the dependency and migrating I'm currently investigating the remaining CI failures. The implementation builds locally, the JSON test suite passes, and several CI workflows also pass. The remaining failures all seem to fail during CMake configure because I've narrowed it down to the dependency integration ( |
34ac15f to
a02cc13
Compare
5ee7a89 to
b2cabab
Compare
|
Hi @kou, I've updated the bundled simdjson to v4.6.4, added the required system packages for the SYSTEM dependency path, and added
I investigated the MSVC failure by looking into the vcpkg integration ( Do you have any suggestions on where I should look next for these remaining Windows-specific issues? |
|
|
FetchContent will fix it.
We may need to disable PCH (pre-compiled headers) with old MinGW. Could you try this? diff --git a/ci/scripts/PKGBUILD b/ci/scripts/PKGBUILD
index 6a66d86867..4737a7b1d8 100644
--- a/ci/scripts/PKGBUILD
+++ b/ci/scripts/PKGBUILD
@@ -137,6 +137,7 @@ build() {
-DARROW_CXXFLAGS="${CPPFLAGS}" \
-DAWSSDK_SOURCE=BUNDLED \
-DCMAKE_BUILD_TYPE="release" \
+ -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DCMAKE_UNITY_BUILD=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON \See also: https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_PRECOMPILE_HEADERS.html |
b2cabab to
04a5103
Compare
04a5103 to
6ebc585
Compare
cd6ce14 to
195b62e
Compare
|
Hi @kou, I ran a quick microbenchmark comparing the current RapidJSON: 18.33 s average (1.83 µs/iteration) That is approximately a 6.3× speedup (about 84% lower execution time) for this workload.
|
|
I updated the I'm not yet sure why the MSVC configuration is the only one exhibiting this linker issue. Do you have any suggestions? |
ac009b2 to
59820cd
Compare
|
I investigated the MSVC failure further. The failing job is using the vcpkg-provided simdjson (4.6.4), and
However, the build still fails with unresolved references to:
I tried investigating whether this is related to how the vcpkg package is built or linked, but I haven't been able to isolate the cause. Do you have any suggestions on where I should look next, or is there something specific about the MSVC/vcpkg configuration that I'm missing? |


Rationale for this change
This PR is the first in a series of PRs for GH-35460 to migrate Arrow's JSON implementation from RapidJSON to simdjson.
As the foundation for the migration, this PR introduces simdjson into Arrow's build system, updates the bundled simdjson version to v4.6.4, and migrates the self-contained
arrow::json::internal::ObjectParser.What changes are included in this PR?
This PR:
simdjsonas a third-party dependency.simdjson.simdjsoninto the Arrow JSON library.arrow::json::internal::ObjectParserfrom RapidJSON to the simdjson DOM API.This establishes the build infrastructure needed for the remaining JSON migration, which will be completed incrementally in follow-up PRs.
Are these changes tested?
Yes.
ObjectParser.Related #35460