-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grok is slow #75
Comments
I improve the grok test:
But the results are still bad:
|
@fbacchella Thanks for this benchmark tool. We ran this with @keitaf's PR: https://github.com/paulwellnerbou/java-grok/pull/1 with our fork: https://github.com/dashbase/grokspeed/commit/7d0c7d25aaec426d2f9dd47edc4916140f22bc2a And we see significant gains: before:
after:
There are some API changes necc. for the optimization to work. |
Very nice. |
Thanks @fbacchella |
jregex was unable to handle big regex and the last release is from 2002. |
I put joni into my performance improvement branch and ran the performance test. java.regex
joni
Looks like joni doesn't give us performance boost, mostly because of String/UTF-16 <-> byte[]/UTF-8 conversion cost. |
Strange because my RegexPerf.org_joni test includes the conversion, so I should bet results similar. |
And after the updates:
Tested with Java 10:
Java's regex improved, but grok decreased ! |
I'm using Code Tools: jmh to bench grok against java's regex.
The result for the following simple code:
returns, on a Intel Xeon E312xx:
That's 11 time slower !
The full maven project for running tests is: fbacchella/grokspeed. It's run with
mvn clean package && java -jar target/grokspeed.jar
The text was updated successfully, but these errors were encountered: