aboutsummaryrefslogtreecommitdiff
path: root/prepare_ebarlas.sh
diff options
context:
space:
mode:
authorElliot Barlas <elliotbarlas@gmail.com>2024-01-31 13:12:35 -0800
committerGitHub <noreply@github.com>2024-01-31 22:12:35 +0100
commita11e5a12470c8c5edad09622f3d23b660853798b (patch)
tree038387150b8638eacc5beb50dd26b4a2bd150a98 /prepare_ebarlas.sh
parente639e2a045371ab0be51404767a42f22f689cf2c (diff)
Use GraalVM native image for ebarlas submission. (#698)
Diffstat (limited to 'prepare_ebarlas.sh')
-rwxr-xr-xprepare_ebarlas.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/prepare_ebarlas.sh b/prepare_ebarlas.sh
index f83a3ff..64b2bea 100755
--- a/prepare_ebarlas.sh
+++ b/prepare_ebarlas.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_ebarlas_image ]; then
+ NATIVE_IMAGE_OPTS="-H:+UnlockExperimentalVMOptions --initialize-at-build-time=dev.morling.onebrc.CalculateAverage_ebarlas --gc=epsilon -O3 -march=native -R:MaxHeapSize=128m -H:-GenLoopSafepoints --enable-preview"
+ native-image $NATIVE_IMAGE_OPTS -cp target/average-1.0.0-SNAPSHOT.jar -o target/CalculateAverage_ebarlas_image dev.morling.onebrc.CalculateAverage_ebarlas
+fi