The pure Java implementations allocate a lot of temporary objects, and the JNI implementation is substantially more performant.