Skip to content
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

Slightly speed up scripts (backport of #68478) #68524

Merged
merged 1 commit into from Feb 4, 2021

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Feb 4, 2021

This saves a couple of nanoseconds on ever invocation of a painless
script that uses SearchLookup. Which is most of the scripts in the hot
path. This amounts to a 3.5% performance savings for things like script
scoring and runtime fields. We got this by speeding up a method that the
async profiler reported as taking 20% of the time running a script score
with painless. This drops it to 1%. You'd think that'd result in a 19%
speed up. But no such luck.

This saves a couple of nanoseconds on ever invocation of a painless
script that uses `SearchLookup`. Which is most of the scripts in the hot
path. This amounts to a 3.5% performance savings for things like script
scoring and runtime fields. We got this by speeding up a method that the
async profiler reported as taking 20% of the time running a script score
with painless. This drops it to 1%. You'd think that'd result in a 19%
speed up. But no such luck.
@nik9000 nik9000 merged commit 95ee440 into elastic:7.x Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant