-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Replace in_tail with a faster implementation. #2527
Conversation
Signed-off-by: Yuta Iwama <[email protected]>
Hmm... why |
How about reducing method call by passing
|
According to the profiling,
|
Signed-off-by: Yuta Iwama <[email protected]>
Good. |
Note: fluentd uses
|
Replace in_tail with a faster implementation. Signed-off-by: Masahiro Nakagawa <[email protected]>
I will replace them in my spare time. |
Which issue(s) this PR fixes:
no
What this PR does / why we need it:
slice!
is very slow. so I replaced in_tail implementation withslice
+freeze
.This change makes FIFO of in_tail about 100x faster in ruby 2.6's simple benchmark.
benchmark script & result: https://gist.github.com/ganmacs/3f517c79881f56547cde305ae7a86b35
Docs Changes:
no
Release Note:
Replace in_tail with faster implementation.