Skip to content

Conversation

pessi-v
Copy link

@pessi-v pessi-v commented Jun 23, 2025

Use unshift instead of insert(0, ...) for better performance. The unshift method is specifically optimized for prepending elements and is faster than using insert at index 0.

Idea was taken from fast-ruby.

@pessi-v
Copy link
Author

pessi-v commented Jun 23, 2025

Ok, I think this one is ready for review!

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.

1 participant