uthash ChangeLog
================

include::sflogo.txt[]

Click to return to the link:index.html[uthash home page].

Version 1.8 (2009-09-08)
--------------------------
* Added the `hashscan` utility that can report on the size and quality of 
  hash tables in a running process (Linux-only)
* Added Bloom filter support. This has the potential to speed up certain 
  types of programs that look up non-existant keys in sufficient numbers.
* Restored the MurmurHash, which can once again be used, if an additional 
  symbol is defined. This is a "safety" by which the user declares they
  understand that `-fno-strict-aliasing` flag must be used if they are 
  using MurmurHash under gcc with optimization.
* Unified the bucket/table malloc hooks; now there is only one malloc hook
* Re-organized the manual into a main section and advanced topics section 
* Fixed a bug in `utlist.h` where sorting a singly-linked list threw a 
  compile-time error. 
* Fixed a bug in `utlist.h` where a doubly-linked list that is sorted
  did not maintain the special `head->prev` pointer back to the list tail.

Version 1.7 (2009-06-11)
--------------------------
* The MurmurHash has been removed, and Jenkin's hash is once again the default.
  While MurmurHash performed well, it's unsafe with regard to the strict
  aliasing rule. This results in incorrect code when compiled with optimization.
  It's not possible to enable `-fno-strict-aliasing` from within a header file.
* The linked list macros in `utlist.h` now comply with the strict-aliasing
  rule so they generate correct code under high optimization levels (O2 or O3).
  The use of the `__typeof__` extension, which was originally a GNU extension,
  may reduce portability to other compilers that do not support this extension.
  This extension is used in the singly-linked list macros and the sort macros.

Version 1.6 (2009-05-08)
--------------------------
Special thanks to Alfred Heisner for contributing several enhancements:

* Support for two new hash functions:
  - the Paul Hsieh hash function (`HASH_SFH`) 
  - Austin Appleby's MurmurHash function (`HASH_MUR`) 
* Because of its excellent performance, MurmurHash is now the default hash function.
* `keystats` now has much better elapsed time accuracy under Cygwin and MinGW
* fixed casting in `HASH_FNV`, `HASH_SAX` and `HASH_OAT` for non-char keys 

This release also includes:

* a new `HASH_CLEAR` operation clears a hash table in one step. 
* a new `HASH_SELECT` operation inserts those elements from one hash that
  satisfy a given condition into another hash. The selected items have
  dual presence in both hash tables. For example a game could select the
  visible polygons from a hash of all polygons.
* fixed a compile-time error which occurred if the final argument to 
  `HASH_ADD_KEYPTR` was a pointer to an array member like `&a[i]`
* added another test script `tests/all_funcs` which executes the test suite 
  using every supported hash function

And lastly,

* a new, separate header called link:utlist.html[utlist.h] is included which
  provides 'linked list macros' for C structures, similar in style to the
  uthash macros

Version 1.5 (2009-02-19)
--------------------------
* now thread-safe for concurrent readers
* use scratch variables on stack rather than in table (thanks, Petter Arvidsson!).
  This change made HASH_FIND about 13% faster and enabled reader concurrency.
* made link:license.html[BSD license] terms even more permissive
* added link:userguide.pdf[PDF version] of User Guide 
* added http://troydhanson.wordpress.com/feed/[update news] image:img/rss.png[(RSS)]

Version 1.4 (2008-09-23)
--------------------------
* Add `HASH_COUNT` for counting items in the hash
* Compatibility with C\+\+. Satisfy additional casting requirements.
  Also in the `tests/` directory, running `make cplusplus` now compiles
  all the test programs with the C++ compiler.
* Eliminate `elmt` pointer from the UT_hash_handle. Calculate elmt
  from hash handle address by subtracting `hho` (hash handle offset).
* Contributed by L.S.Chin:
  Cast `void*` to char* before pointer arithmetic to suppress compiler 
  warnings. We assume compilers abide to C standards which impose 
  requirement that `sizeof(void*) == sizeof(char*)`.
* Return meaningful exit status from do_tests per Tiago Cunha,
  so that package manager-based install can verify tests are successful


Version 1.3 (2008-07-27)
------------------------
* use integer-only math-- no floating point! Support FPU-less CPU's.
* eliminate `hash_q` metric, which measured the fraction of items with
  non-ideal chain positions. We only need to know if this fraction
  is below 0.5. This is now determined using fast bitwise tests.
* when an item is added to the hash, calculate the key's hash value
  upfront and store it, instead of recomputing it as needed. This hashv
  is stored in the hash handle. Potentially major speed benefit for
  bucket expansion algorithm. Deleting is marginally improved too.
* fixed a minor bug in the calculation of the max ideal chain length;
  line 446 in v1.2 erroneously calculated a/b*2 instead of a/(b*2).
  The effect of this bug was that bucket expansion could occur more 
  readily because the per-bucket 'max chain length multiplier factor'
  (which delays bucket expansion when certain buckets are overused) 
  was set to a lower, expansion-favoring value than intended.
* improved source commenting and improved variable names in structures
* remove `HASH_JSW`. Lengthy random number array made code less readable
* add `HASH_SRT(hh,hash,cmp)` as a generalized `HASH_SORT(hash,cmp)`. 
  It was an omission in uthash 1.2 that there was no sort macro for
  hash handles with names other than hh.
* Corrected `HASH_FSCK` so it works with any name for the hash handle.
* behave properly in pathological `HASH_DEL(a,a)` case where the same
  variable references the head and the deletee (advancing the head 
  then loses the correct reference to the deletee); fix by using 
  scratch area in the hash table to store deletee hash handle.
* made tests runnable on MinGW 
* 3000+ downloads since uthash-1.0


Version 1.2 (2006-11-22)
------------------------
* new `HASH_SORT` macro
* Cygwin support
* User Guide now features a clickable Table of Contents.
  (The technique for generating the TOC on the browser was contributed
  back to the AsciiDoc project and incorporated into AsciiDoc v8.1.0).


Version 1.1 (2006-06-28)
------------------------
* uthash-1.1 released
* supports several built-in user-selectable hash functions
* new keystats utility quantifies performance of hash functions


Version 1.0 (2006-06-02)
------------------------
* Initial release

// vim: set syntax=asciidoc:
