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

zero out allocated buffers on allocation #21

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

ortuman
Copy link
Owner

@ortuman ortuman commented Mar 12, 2024

This change moves the logic to zero out the buffers returned by the arena to the Alloc method, thus avoiding having to clear the entire buffer when resetting the arena.

This is clearly reflected in the new benchmark results, now showing improved arena performance both when allocating objects and slices.

@ortuman ortuman self-assigned this Mar 12, 2024
Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
@ortuman ortuman force-pushed the ortuman/zero-ptr-mem-on-allocation branch from 04495f6 to 31aa100 Compare March 12, 2024 15:12
@ortuman ortuman merged commit b9bea4a into main Mar 12, 2024
1 check passed
@ortuman ortuman deleted the ortuman/zero-ptr-mem-on-allocation branch March 12, 2024 15:13
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.

None yet

1 participant