Skip to content

Conversation

@mfowlewebs
Copy link

This is a speculative optimization that converts rewrite_rule.rb to using symbols instead of strings for the rule hash's keys . It should make processing the rules some faint little bit faster.

There is some cost to interning the rules, but this is only paid once, at initialization time.

For more information, see also http://stackoverflow.com/questions/8189416/why-use-symbols-as-hash-keys-in-ruby .

This is a rather speculative optimization that converts rewrite_rule.rb
to using symbols instead of strings for it's fields. It should
definitely make using the rules some faint little bit faster. There is
some cost to interning the rules, but this is only paid once, at
initialization time.
@cosmo0920
Copy link
Contributor

cosmo0920 commented Nov 14, 2016

Currently, I vote 👎 for this.
Fluentd v0.14 also supports Ruby 2.1 which does not have Symbol GC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants