SnowPaper jni optimization