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

perf: allow pre-allocate of size when new map #48

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

VarusHsu
Copy link
Contributor

@VarusHsu VarusHsu commented Nov 29, 2024

There is a simple result from the bench test:

entries withInitialedSize withoutInitialedSize rate
1e3 41153 ns/op 72909 ns/op 56.44%
1e5 7523395 ns/op 9731575 ns/op 77.31%
1e7 2005930041 ns/op 2555268041 ns/op 78.50%

This change is Reviewable

orderedmap.go Outdated Show resolved Hide resolved
@VarusHsu
Copy link
Contributor Author

VarusHsu commented Dec 2, 2024

I have merged it into one commit.

@elliotchance elliotchance merged commit 378040e into elliotchance:master Dec 4, 2024
2 checks passed
@elliotchance elliotchance mentioned this pull request Dec 4, 2024
Merged
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