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

New ZipForArrayWrapping cop to detect and encourage the performant way to make an array of arrays #477

Open
corsonknowles opened this issue Nov 10, 2024 · 0 comments

Comments

@corsonknowles
Copy link

corsonknowles commented Nov 10, 2024

Is your feature request related to a problem? Please describe.

We would like to use the most efficient way to take an array and turn it into an array of arrays, 1 for each entry.

Describe the solution you'd like

We would like to use .zip as it is 40-90% more efficient than .map {|id| [id]}

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