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

Reuse heap elements for Push/Pop operations #45

Merged
merged 1 commit into from
Apr 1, 2020
Merged

Conversation

alldroll
Copy link
Member

@alldroll alldroll commented Mar 31, 2020

Optimize memory usage by reusing heap elements for Push/Pop operations described here

benchmark                         old ns/op     new ns/op     delta
BenchmarkSuggest-8                21650         21742         +0.42%
BenchmarkSuggestWordsOnDisc-8     332217        305817        -7.95%

benchmark                         old allocs     new allocs     delta
BenchmarkSuggestWordsOnDisc-8     636            611            -3.93%

benchmark                         old bytes     new bytes     delta
BenchmarkSuggestWordsOnDisc-8     25371         22465         -11.45%

@alldroll alldroll self-assigned this Mar 31, 2020
@alldroll alldroll merged commit afa339c into master Apr 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant