Skip to content

allocate the memory of XXHash object on stack#34

Open
wanghaao wants to merge 4 commits intoOneOfOne:masterfrom
wanghaao:feature/memory_stack
Open

allocate the memory of XXHash object on stack#34
wanghaao wants to merge 4 commits intoOneOfOne:masterfrom
wanghaao:feature/memory_stack

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