-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Optimize dotCount in expanding dot parser #135263
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
Conversation
Pinging @elastic/es-perf (Team:Performance) |
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
Hi @ChrisHegarty, I've created a changelog YAML for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
This commit optimises the implementation of
dotCount
, in order to avoid costly walking each character. The implementation change is small, but defers toString::indexOf
, which is backed by a vectorized JVM Hotspot intrinsic.I noticed this method showing up in cpu profiles, in some cases consuming ~2% when there are even no fields with dots! After the change this mostly drops away. For example,