Skip to content

Conversation

@the-spectator
Copy link
Contributor

We can avoid extra allocation by directly calling #to_h on ENCODING.split('').each_with_index instead of first converting it to an array and then converting it to a hash.

This is not a Hot path for this library as constants are generated only on load. Please feel free to close the PR if this qualifies as a cosmetic change.

@colinbendell
Copy link

Further addressed in PR #10

@abachman
Copy link
Owner

closing in favor of #10, which changes the same location

@abachman abachman closed this May 29, 2024
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.

3 participants