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

Investigate Performance/CollectionLiteralInLoop for Ruby 3.4 #482

Open
Earlopain opened this issue Dec 25, 2024 · 0 comments
Open

Investigate Performance/CollectionLiteralInLoop for Ruby 3.4 #482

Earlopain opened this issue Dec 25, 2024 · 0 comments

Comments

@Earlopain
Copy link
Contributor

Ruby 3.4 added optimizations which I believe are relevant to this cop. See ruby/ruby#12123

Basically specialized instruction handling for [:a, :b].include?(@ivar). I haven't benchmarked yet but maybe this cop can be disabled on ruby 3.4 for most common simple cases if numers are good. Will investigate later.

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

No branches or pull requests

1 participant