diff options
author | Roy van Rijn <roy.van.rijn@gmail.com> | 2024-01-11 11:12:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-11 11:12:05 +0100 |
commit | 8c248714061535a819181ca137876fa1435a7e7d (patch) | |
tree | 876b92713fea4cd172f8655702bdf9656f7cbc86 /prepare_royvanrijn.sh | |
parent | b0c9952c082d2c9dc772328100b60ef0da82f0c9 (diff) |
Fixing the off-by-one error and updating to native, redone layout of code. (#307)
Diffstat (limited to 'prepare_royvanrijn.sh')
-rwxr-xr-x | prepare_royvanrijn.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/prepare_royvanrijn.sh b/prepare_royvanrijn.sh index f83a3ff..2088b7b 100755 --- a/prepare_royvanrijn.sh +++ b/prepare_royvanrijn.sh @@ -17,3 +17,12 @@ source "$HOME/.sdkman/bin/sdkman-init.sh" 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_royvanrijn_image ]; then + + JAVA_OPTS="--enable-preview -dsa" + NATIVE_IMAGE_OPTS="--gc=epsilon -Ob -O3 -march=native --strict-image-heap $JAVA_OPTS" + + native-image $NATIVE_IMAGE_OPTS -cp target/average-1.0.0-SNAPSHOT.jar -o target/CalculateAverage_royvanrijn_image dev.morling.onebrc.CalculateAverage_royvanrijn +fi |