Skip to content

TommyDS 4.0

Latest

Choose a tag to compare

@amadvance amadvance released this 13 Nov 07:24
  • BREAKING CHANGE: tommy_tree_insert() now inserts elements with duplicate
    keys and has a void return type. Code that used its return
    value to detect duplicates must call the new tommy_tree_insert_unique().
    Tree search and removal select the first equal element in tree order.
  • BREAKING CHANGE: Renamed tommy_array_insert() to
    tommy_array_insert_tail() and tommy_arrayblk_insert() to
    tommy_arrayblk_insert_tail(). Callers must use the new names.
  • BREAKING CHANGE: Reimplemented tommy_hash_u32() and tommy_strhash_u32()
    using a modified a5hash32, and tommy_hash_u64() and the new tommy_strhash_u64()
    using a modified a5hash. Both algorithms pass SMHasher3 tests.
    The resulting hash values differ from previous versions.
  • Added tommy_mulhash_u32() and tommy_mulhash_u64(), reversible integer
    hashes based on MurmurHash3 fmix32 and the SplitMix64 finalizer, for
    architectures with fast integer multiplication.
  • In hashtable, tree, trie and inplace trie, added find* functions returning
    container nodes for traversal and metadata inspection. Tree and trie variants
    include inclusive and exclusive key bound lookups, with custom comparison
    variants for tree.
  • In list, added relative insertion, prepending, removal at either end,
    backward iteration, ways to reorder or exchange list contents, transferring
    ranges or whole lists without copying objects, and merging two sorted lists
    while preserving the order of equal elements.
  • In hashtable, added querying table state, emptying while retaining
    buckets, inserting only absent keys, updating an existing node's hash,
    draining nodes to a list, and reserving or shrinking bucket allocations.
  • In hashtable, hashdyn and hashlin, added bidirectional traversal with
    head(), tail(), next() and prev(), allowing insertions and removals during
    iteration.
  • In tree, added navigation and key ordering, testing for emptiness,
    removing the smallest or greatest element, constant-time tree swapping,
    inclusive and exclusive key bound searches, unique insertion, removal using
    a custom comparison, clearing for reuse, and draining nodes to a list in
    tree order.
  • In trie and inplace trie, added inclusive and exclusive key bound searches,
    selecting duplicates in insertion order like the corresponding tree searches,
    and removing the smallest or greatest element.
  • In array, added preallocating capacity, bidirectional resizing with
    automatic zeroing of unused slots upon shrinking, clearing while preserving
    allocated capacity, releasing unused memory without moving elements,
    accessing, appending, and removing tail elements, querying state,
    constant-time array swapping, and iterating across initialized elements.