Skip to content

allocate the memory of XXHash object on stack#34

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

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

Conversation

@wanghaao

@wanghaao wanghaao commented Oct 6, 2022

Copy link
Copy Markdown

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

@OneOfOne

OneOfOne commented Oct 6, 2022

Copy link
Copy Markdown
Owner

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

wanghaao commented Oct 7, 2022

Copy link
Copy Markdown
Author

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