Jamie Balfour

Welcome to my personal website.

Find out more about me, my personal projects, reviews, courses and much more here.

Official ZPE/YASS documentationZPE Native

Official ZPE/YASS documentationZPE Native

What is ZPE Native?

ZPE Native is a new (first built in August 2022) distribution of ZPE that has been made available to download.

ZPE Native is a native build for each operating system and platform. By being a native image it is no longer a cross-platform binary but offers higher performance than can be achieved with the Java Runtime Environment based ZPE.

The following videos show the difference between the Java and native versions in terms of performance. They both show the Java version first then move to the native version.

This video shows the performance difference when carrying out a loop (for ($i = 0 to 100000)) { print($i) }) in YASS:

ZPE performs considerable better when running the native build, but some features are not available in the native version as of yet. For example, all of the sound features are currently unavailable.

Another example, the ZPE Standard Library compiles and runs in 13ms on the native build versus 97ms with the Java version.

Both the Java version and the ZPE Native version compile the standard library's 700 lines almost instantly due to a high-performance parser and compiler, but when they are running it the difference between the two is around about 50ms. However, the CPU time is much lower on the Native version.

How do I download ZPE Native?

ZPE Native is available in aarch64, Windows x86-64 and Ubuntu Linux x86-64 formats from my Downloads Center on my website. I have configured my script to compile ZPE Native so that it is uploaded immediately after compilation is finished, so it remains up to date with the JRE version.

Compiling natives

You can use GraalVM's native-image to compile the JAR into a native image if you want the best performance.

Below are a few examples of commands you can run after downloading the JAR and installing GraalVM and native-image. You'll need the reflectConfig.json file to compile (make sure to put it in to the same folder as the zpe.jar file):

Windows

Batch file
#amd64 architecture (Windows)
native-image.exe -H:ReflectionConfigurationFiles="reflect-config.json" -H:Name=ZPE -H:IncludeResources="/changelog.txt|files/.*" -jar zpe.jar zpe-win-x64 --no-fallback

macOS

Shell
#aarch64 architecture (macOS, Apple Silicon)
native-image -H:ReflectionConfigurationFiles="reflect-config.json" -H:Name=ZPE -H:IncludeResources="/changelog.txt|files/.*" -jar zpe.jar zpe-aarch64 --no-fallback

Linux

Shell
#amd64 architecture (Linux distributions)
native-image -H:ReflectionConfigurationFiles="reflect-config.json" -H:Name=ZPE -H:IncludeResources="/changelog.txt|files/.*" -jar zpe.jar zpe-linux-x64 --no-fallback
Comments
Feedback 👍
Comments are sent via email to me.