-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade GraalVM Native Image for Faster Startup Demo
- Loading branch information
Showing
3 changed files
with
63 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
# Build a native excutable | ||
$JAVA_HOME/bin/javac ListDir.java | ||
$JAVA_HOME/bin/native-image ListDir | ||
time java ListDir $1 | ||
time ./listdir $1 | ||
|
||
$JAVA_HOME/bin/javac ExtListDir.java | ||
$JAVA_HOME/bin/native-image --language:js ExtListDir | ||
# Build an optimized native excutable with PGO | ||
$JAVA_HOME/bin/native-image --pgo-instrument ListDir -o listdir-instrumented | ||
./listdir-instrumented $1 | ||
$JAVA_HOME/bin/native-image --pgo ListDir -o listdir-optimized | ||
./listdir-optimized $1 | ||
time java ListDir $1 | ||
time ./listdir $1 |
This file was deleted.
Oops, something went wrong.