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

allocate the memory of XXHash object on stack #34

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

wanghaao
Copy link

@wanghaao wanghaao commented Oct 6, 2022

In the case of frequently calculating hash values, it performs better.

@OneOfOne
Copy link
Owner

OneOfOne commented Oct 6, 2022

Can you add a benchmark on why this is needed? and add one for 64bit.

@wanghaao wanghaao closed this Oct 7, 2022
@wanghaao wanghaao reopened this Oct 7, 2022
@wanghaao
Copy link
Author

wanghaao commented Oct 7, 2022

Can you add a benchmark on why this is needed? and add one for 64bit.

Thanks for your comments.

I have added the case for 64bit.
It's difficult to add a benchmark. Goland will apply for memory from os in the initial process, then the benchmark-test will reuse this memory space. However, It is beneficial to the business scene where has been existed frequent memory allocation.

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