Releases: bamless/extlib
Releases · bamless/extlib
extlib version 2.1.1
- Now the hashmap grows only when actual live entries (i.e. not
tombstones) occupy at least 37.5% (half of occupancy threshold - 75%) of the buckets
after a successfulEXT_HMAP_NEEDS_RESIZEcheck (that checks if live entries +
tombstones exceed the 75% threshold). This should make the growing behaviour a little
bit more conservative in mixed usage scenarios (lots of inserts, deleted and lookups). - Swapped old c-string hash function with FNV-1a Hash. This gives us a slightly better
distribution at no extra downsides.
Full Changelog: v2.1.0...v2.1.1
extlib v2.1.0
- 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. - Move back to
static inlineinstead ofinline/extern inlinepairs for all inline
functions defined in the header.
extlib v2.0.2
- Minor changes to
EXT_ALIGN_PADmacro. - Better strict-aliasing behaviour for
ext__hmap_grow_. - Added
EXTLIB_SHARED_EXPORToption andEXT_APImacro to support building extlib as a
shared library (.dll / .so). WhenEXTLIB_SHARED_EXPORTis defined,EXT_APIexpands to
the appropriate export attribute in theEXTLIB_IMPLtranslation unit and to the
corresponding import attribute everywhere else. All public non-inline functions,
extern inlinedeclarations inEXTLIB_IMPL, and exported data variables are
annotated withEXT_API. Inline definitions in the header are left unmarked.
extlib v2.0.1
- Better implementations of builtin functions when compiling wasm with clang.
- Correctly mark
ext_allocator_memdupandext_allocator_strdupinline.
extlib v2.0.0
- Breaking changes on hashmap implementation:
Reworked the hashmap implementation to make possible the usage ofext_hmap_getand
ext_hmap_get_defaultfamily of functions as expressions. Now it is possible to do
things like:Entry* e = hmap_get_cstr(&hmap, "key"); if(e != NULL) { ... }
- Added
Ext_ArrayandExt_HashMap/Ext_Entrymacros to define required struct layout
for both dynamic arrays and hashmap in-line.
This makes it possible to skip declaring the full struct by hand when we do not need
to reference it by name (i.e. create variables to it, pass it to functions, etc.):Declaring full struct layout by hand is still supported.Array(int) int_array = {0}; HashMap(char*, int) int_map = {0};
- Breaking change: removed deprecated functions and macros:
1.ext_strdup_allocandext_memdup_alloc
2.EXT_DEFER_LOOP
extlib v1.4.0
- Simplified arena allocator
- Fixes in temp allocator and arena allocator
extlib version 1.3.2
- Fix build on win32 clang
extlib version 1.3.1
- Bugfixes in path handling functions, especially around win32 drive letters and UCN paths
- Fixed
ext_new_arraymacro - Minor other bugfixes
extlib version 1.3.0
Changelog:
- New
StringSlicefunctions:ss_strip_prefix,ss_strip_suffix(and_cstr
variants),ss_eq_ignore_case,ss_cmp_ignore_case,ss_starts_with_ignore_case,
ss_ends_with_ignore_case(and_cstrvariants),ss_substr - New path manipulation functions:
ss_basename,ss_dirname,ss_extension,
sb_append_path(and_cstrvariant). Handles both/and\on Windows - New
StringBufferfunctions:sb_to_upper,sb_to_lower,sb_reverse - Added missing shorthand aliases for
ss_foreach_split_cstrand
ss_foreach_rsplit_cstr
extlib version 1.2.1
- Added
arena_pushandarena_popmacros - Renamed
DEFER_LOOPtodefer_loop. Old version is mantained for backwards compatibility - Removed unused defines