Steps to reproduce
- onig4j-v003-src.zip
- Update jni/Makefile with proper
JAVA_HOME and then call make
- Update lib location in
src/onig4j/OnigRegex.java
- Run
OnigPerformanceTest
We've got following results:
java: 4261ms
joni: 5798ms
onig: 3511ms
tm4e: 18ms
With a straightforward approach joni is about 1.5 times slower than oniguruma bindings.
tm4e major boost seems to be a result of src/org/eclipse/tm4e/core/internal/oniguruma/OnigRegExp.java:49: if a regexp is called consequently on the same string it just returns latest cached match result