Skip to content

Commit 6f4254d

Browse files
committed
Hashmap improvements in grow and re-hash
Better hashmap grow and rehash behaviour. Now the hashmap tracks the number of tombstones in the hashmap, and triggers a re-hash if it exceeds the threshold. Same things happens with the number of actual entries, but instead of only re-hashing it grows by doubling and only then re-hashes.
1 parent bf0fb19 commit 6f4254d

3 files changed

Lines changed: 259 additions & 180 deletions

File tree

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
CFLAGS ?= -Wall -Wextra -Wno-override-init -std=c99 -ggdb
1+
# CC = clang
2+
CFLAGS ?= -Wall -Wextra -Wstrict-aliasing=2 -Wno-override-init -std=c99 -ggdb
3+
# -fsanitize=address,undefined -fno-sanitize-recover=all -fno-omit-frame-pointer -fno-optimize-sibling-calls
24
LDFLAGS ?=
35

46
.PHONY: all

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ Features:
3131
> library headers to disable names without prefixes.
3232
3333
Configuration options:
34-
```c
34+
```c
3535
#define EXTLIB_NO_SHORTHANDS // Disable shorthands names, only prefixed one will be defined
3636
#define EXTLIB_NO_STD // Do not use libc functions
3737
#define EXTLIB_WASM // Enable when compiling for wasm target. Implies EXTLIB_NO_STD
3838
#define EXTLIB_THREADSAFE // Thread safe Context
3939
#define EXTLIB_SHARED_EXPORT // Mark all public API symbols for shared library use (see below)
4040
#define NDEBUG // Strips runtime assertions and replaces unreachables with compiler
4141
// intrinsics
42-
```
42+
```
4343
4444
### Building as a shared library
4545

0 commit comments

Comments
 (0)