What is ZPEX?
ZPEX, also known as ZPE Native is a new (first built in August 2022) distribution of ZPE that has been made available to download.
ZPEX is required to build native binaries from YASS code.
ZPEX 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. In addition to that, plugins do not work at all.
Another example, the ZPE Standard Library (1.7.4) compiles and runs in 13ms on the ZPEX build versus 97ms with the Java version.
Both the Java version and the ZPEX 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 ZPEX?
ZPEX is available in aarch64, Windows x86-64 and Linux x86-64 formats from my Downloads Center on my website. I have configured my script to compile ZPEX so that it is uploaded immediately after compilation is finished, so it remains up to date with the JRE version.
Compiling natives
You 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.
Windows
#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
#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
#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

There are no comments on this page.
Comments are welcome and encouraged, including disagreement and critique. However, this is not a space for abuse. Disagreement is welcome; personal attacks, harassment, or hate will be removed instantly. This site reflects personal opinions, not universal truths. If you can’t distinguish between the two, this probably isn’t the place for you. The system temporarily stores IP addresses and browser user agents for the purposes of spam prevention, moderation, and safeguarding. This data is automatically removed after fourteen days. Your email address is stored so that replies can be sent to your email address.
Comments powered by BalfComment