Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: tidwall/hashmap.c

Tags

v0.8.1

Toggle v0.8.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Merge pull request #43 from scossu/const_get

Make hashmap const in read-only methods.

v0.8.0

Toggle v0.8.0's commit message
Add load factor option

It's now possible to set the load factor at compile time using
the HASHMAP_LOAD_FACTOR define:

   cc -DHASHMAP_LOAD_FACTOR=0.75 ...

or by using the hashmap_set_load_factor function

  hashmap_set_load_factor(map, 0.75);

The load factor should be in the range of 50% to 95%.

v0.7.0

Toggle v0.7.0's commit message
Various new updates, features, and optimizations

Changes:
- Added xxhash3 hasher function.
- Added _with_hash functions for manually providing a hash to the
  get, set, and delete functions. This makes the hash callback
  that is given to the hashmap_new function optional.
- Added set_grow_by_power which defines how quickly the hashmap
  grows when needed. Default is 1, which mean it doubles each
  time it needs to grow, setting to 2 or 3 will grow by 4 or 8
  respectively. Max 16.
- Default grow_at percentange has been changed from 0.75 to 0.60.
- The hash field now clipped with bitwise AND instead of shifting.
- The compare function is now optional. When not provided, the
  clipped (48-bit) hash becomes the key.
- Code cleanup

v0.6.2

Toggle v0.6.2's commit message
Simplify Murmur return value

v0.6.1

Toggle v0.6.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #25 from arthurep/fix_resize_new_hashmap

use hashmap_new_with_allocator instead of hashmap_new in resize()

v0.6.0

Toggle v0.6.0's commit message
Add hashmap_iter example

v0.5.0

Toggle v0.5.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #11 from thcopeland/master

Allow passing an element-freeing function to hashmap_new

v0.4.1

Toggle v0.4.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #13 from scossu/const_void_get

Make "key" argument of hashmap_get const void.

v0.4.0

Toggle v0.4.0's commit message
Added hashmap_new_with_allocator

Deprecated hashmap_set_allocator

See #6 for more information

v0.3.3

Toggle v0.3.3's commit message
Fix overflow regression

This commit fixes a regression introduced in c039c88 (v0.3.1)
which causes a heap-buffer-overflow during hashmap_free.

fixes #10