This repository has been archived by the owner on Jun 1, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
smallhash: 2nd optim, linear scan if < 7 keys (WIP)
avoid hash calculation for a short number of keys. calloc the first 7 words of HvARRAY. if we add one to the 6th entry we need to split it, as the 7th, the last, is needed as NULL sentinel. on split a small hash, we need to allocate a fresh array to move the hashed entries to. This can be optimized furtheron. (alloc 2x) on insert a new entry at 7th, we can avoid a split when placeholders exist. just replace it then. See #102 WIP: the standard operations work, but use constant fails. Currently 13% slower.
- Loading branch information
Showing
2 changed files
with
154 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters