reorganize code, little bit faster (#509)

This commit is contained in:
Van Phu DO
2024-01-21 21:25:18 +09:00
committed by GitHub
parent 8ba67cbc6d
commit 410425c833
2 changed files with 28 additions and 25 deletions

View File

@@ -20,6 +20,6 @@ sdk use java 21.0.1-graal 1>&2
# ./mvnw clean verify removes target/ and will re-trigger native image creation.
if [ ! -f target/CalculateAverage_abeobk_image ]; then
NATIVE_IMAGE_OPTS="--gc=epsilon -O3 -march=native --enable-preview"
NATIVE_IMAGE_OPTS="--gc=epsilon -O3 -march=native -R:MaxHeapSize=128m --enable-preview --initialize-at-build-time=dev.morling.onebrc.CalculateAverage_abeobk"
native-image $NATIVE_IMAGE_OPTS -cp target/average-1.0.0-SNAPSHOT.jar -o target/CalculateAverage_abeobk_image dev.morling.onebrc.CalculateAverage_abeobk
fi