Skip to content

Adds an optimization in case when a single number is passed to encode#49

Merged
manigandham merged 1 commit intoullmark:masterfrom
dompagoj:feature/single-number-optimization
Mar 24, 2022
Merged

Adds an optimization in case when a single number is passed to encode#49
manigandham merged 1 commit intoullmark:masterfrom
dompagoj:feature/single-number-optimization

Conversation

@dompagoj
Copy link
Contributor

@dompagoj dompagoj commented Mar 24, 2022

I figured that by far the most used case is passing a single number to the Encode function, so i added a very small optimization to it, performance is about the same, but memory consumtion is close to 3x less.

image

@manigandham
Copy link
Collaborator

Looks good, thanks @dompagoj

@manigandham manigandham merged commit 51e4204 into ullmark:master Mar 24, 2022
@manigandham manigandham self-assigned this Mar 26, 2022
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