Skip to content

native: build the image at -O3 - #160

Merged
tae898 merged 1 commit into
mainfrom
perf/159-native-o3
Oct 31, 2026
Merged

tae898 merged 1 commit into
mainfrom
perf/159-native-o3

Conversation

@tae898

@tae898 tae898 commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Builds the native image at -O3 instead of -O2 on every platform: native/scripts/build-image.sh passes -Dnative.opt=-O3, the native/pom.xml comment no longer says that -O2 and -O3 are the same on GraalVM CE, and arcadedb._build_info.NATIVE_IMAGE records -O3. The measurements are in #159: the four warm figures have a geometric mean of 0.736, ingest is 11 to 15 percent faster, peak RSS is unchanged, and the library is 1.62x larger.

Verification before merge: pull requests build only linux-x86_64, so I dispatch this workflow on the branch (all four platforms, Python 3.12 and 3.14) and merge when every parity leg passes. The resulting wheel sizes go into a comment here; the project policy is under 100 MB per wheel (scripts/verify_wheel_size.py).

Closes #159

🤖 Generated with Claude Code

On GraalVM CE 25.4.4.1.1 -O3 is not the same as -O2 (the pom.xml comment said it was).
Timed laptop A/B, -O3 against -O2 at -march=compatibility: the four warm figures have a
geometric mean of 0.736, document ingest 0.852, graph ingest 0.884, peak RSS unchanged; the
library is 1.62x larger and the build takes 1.43x as long. -march=x86-64-v3 gave no gain worth a
second library, so the wheel keeps -march=compatibility. NATIVE_IMAGE in _build_info records -O3.

Closes #159

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tae898

tae898 commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator Author

The dispatched run on this branch (41228183408, head 71c31046c6, all four platforms, Python 3.12 and 3.14) passed every leg. Wheel sizes from the native-wheel-* artifacts of that run against the last -O2 run (#156's dispatch):

platform -O2 (run 41179658884) -O3 (run 41228183408) ratio
linux-aarch64 37.7 MB 63.9 MB 1.69
linux-x86_64 37.5 MB 62.7 MB 1.67
macos-arm64 38.1 MB 64.5 MB 1.69
windows-x64 38.2 MB 63.6 MB 1.66

The largest is 64.5 MB, under the 100 MB per-wheel policy. The 1.66 to 1.69x growth on every platform is in line with the 1.62x library growth measured in #159, so -O3 took effect on all four builds.

@tae898
tae898 merged commit 062e816 into main Oct 31, 2026
25 checks passed
@tae898
tae898 deleted the perf/159-native-o3 branch October 31, 2026 18:53
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.

Native image: -O3 is faster than -O2 on GraalVM CE (warm geomean 0.736), at 1.62x the library size

1 participant