-
Notifications
You must be signed in to change notification settings - Fork 103
Configuration
Kai Burjack edited this page May 7, 2020
·
16 revisions
JOML provides some configuration via JVM System Properties to change the behaviour of certain operations at runtime.
Property | Description | Values | Default | Since |
---|---|---|---|---|
joml.debug | Performs checks that impact performance but don't crash the JVM, such as checking whether only direct NIO Buffers are used when 'joml.nounsafe' is not set and sun.misc.Unsafe is available. | true (implicit), false | false | |
joml.nounsafe | Whether not to use sun.misc.Unsafe to accelerate memory copy operations, even if it is available. Please note that using joml.nounsafe will result in performance degradations of many operations, especially copying memory from/to arrays, NIO buffers and JOML objects
|
true (implicit), false | false | |
joml.fastmath | Whether fast approximations of some java.lang.Math operations should be used, most notably sin/cos. See the JavaDoc of the class org.joml.Math for more information. | true (implicit), false | false | |
joml.sinLookup | If joml.fastmath is used, then this controls whether to use a lookup table implementation of the sin/cos approximation. If false, then an arithmetic approximation is used. See the JavaDoc of the class org.joml.Math for more information. | true (implicit), false | false | |
joml.sinLookup.bits | If joml.sinLookup is used, then this controls the size of the lookup table. Lower values reduce the table size but lead to less accurate approximations. | integer | 14 | |
joml.format | If disabled, then a default NumberFormat instance with English locale is used to format all numbers in toString() instead of scientific notation. | true (implicit), false | true | |
joml.format.decimals | If joml.format is enabled, then this determines the number of decimal digits in the scientific notation used to format all numbers in toString(). |
integer | 3 | |
joml.useMathFma | If enabled, java.lang.Math.fma() is used in most matrix/vector/quaternion methods. | true (implicit), false | false | 1.9.24 |
joml.forceUnsafe | If enabled, the use of sun.misc.Unsafe is forced. If it is not supported, then operations that would use it throw org.joml.ConfigurationException
|
true (implicit), false | false | 1.9.25 |
To disable the use of sun.misc.Unsafe:
java -Djoml.nounsafe -jar yourapp.jar
To use fast lookup table approximations of sin/cos with 10 bits of table size:
java -Djoml.fastmath -Djoml.sinLookup -Djoml.sinLookup.bits=10 -jar yourapp.jar