Skip to content

Avoid memset when clearing an empty table - #155

Merged
martinus merged 3 commits into
martinus:mainfrom
dp1:fast-clear-on-empty-table
Jul 3, 2026
Merged

Avoid memset when clearing an empty table#155
martinus merged 3 commits into
martinus:mainfrom
dp1:fast-clear-on-empty-table

Conversation

@dp1

@dp1 dp1 commented Nov 29, 2025

Copy link
Copy Markdown
Contributor

clear_buckets memsets all buckets to 0. If the table is already empty, there is no need to do so, and we can save a little bit of time. Helpful when clearing a bigger data structure that contains multiple maps, some of which may be empty.

@martinus
martinus merged commit 97758dc into martinus:main Jul 3, 2026
28 checks passed
@martinus

martinus commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Thanks!

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