Class LibDivide

  • public class LibDivide
    extends java.lang.Object
    Native bindings to libdivide.

    libdivide allows you to replace expensive integer divides with comparatively cheap multiplication and bitshifts. Compilers usually do this, but only when the divisor is known at compile time. libdivide allows you to take advantage of it at runtime. The result is that integer division can become faster - a lot faster.

    LWJGL: This is a hybrid implementation. Divider recovery methods use standard JNI bindings. All *_gen, *_do & *_get_algorithm functions have been ported to pure Java. This eliminates the JNI overhead and enables the JVM to inline and further optimize these methods.