aboutsummaryrefslogtreecommitdiff
path: root/prepare_mtopolnik.sh
diff options
context:
space:
mode:
Diffstat (limited to 'prepare_mtopolnik.sh')
-rwxr-xr-xprepare_mtopolnik.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/prepare_mtopolnik.sh b/prepare_mtopolnik.sh
index f83a3ff..d84f20d 100755
--- a/prepare_mtopolnik.sh
+++ b/prepare_mtopolnik.sh
@@ -16,4 +16,9 @@
#
source "$HOME/.sdkman/bin/sdkman-init.sh"
-sdk use java 21.0.1-graal 1>&2
+sdk use java 21.0.2-graal 1>&2
+
+if [ ! -f target/CalculateAverage_mtopolnik_image ]; then
+ NATIVE_IMAGE_OPTS="--gc=epsilon -O3 -H:+UnlockExperimentalVMOptions -H:-GenLoopSafepoints -march=native --enable-preview -H:InlineAllBonus=10 -H:-ParseRuntimeOptions --initialize-at-build-time=dev.morling.onebrc.CalculateAverage_mtopolnik"
+ native-image $NATIVE_IMAGE_OPTS -cp target/average-1.0.0-SNAPSHOT.jar -o target/CalculateAverage_mtopolnik_image dev.morling.onebrc.CalculateAverage_mtopolnik
+fi