Commit Graph
17 Commits
Author SHA1 Message Date
Tobias Brunner 0e5d587df7 get_match() method added to hashtable_t. 2012-05-24 15:15:34 +02:00
Tobias Brunner ee0fb2ab81 Keep count of remaining elements to enumerate in hashtable_t.
This improves performance during enumeration as not all buckets have to be
checked.
2011-05-24 19:23:45 +02:00
Tobias Brunner 8af0177189 Replaced linked_list_t usage in hashtable_t with custom list implementation.
With this change inserting elements into a hashtable_t object is now
nearly as fast as inserting them into a linked_list_t object, whereas
before it was up to seven times slower.  Additionally, the memory
footprint of a hashtable is now significantly smaller.  The lookup
performance is also nearly doubled.
2011-05-24 19:23:45 +02:00
Martin Willi 7e0eae4985 Replace hashtable key if a put operation replaces value
Fixes a crash if lifetime of key is bound to value (i.e. key == value)
2011-02-03 17:09:09 +01:00
Martin Willi bf3e482141 Fix check to increase hashtable size properly 2011-02-03 17:08:53 +01:00
Tobias Brunner b2ddaf0775 Adding a remove_at method to the hash table.
This allows to remove key-value pairs while enumerating them.
2010-06-07 16:36:26 +02:00
Tobias Brunner 88b6f14143 Migrated hashtable_t to INIT/METHOD macros. 2010-06-07 15:53:36 +02:00
Martin Willi 8aad8f6faf Some coding style cleanups 2009-11-12 10:34:00 +01:00
Martin Willi 7daf5226b7 removed trailing spaces ([[:space:]]+$) 2009-09-04 13:46:09 +02:00
Tobias Brunner 8c5d72cd0b removing svn keyword $Id$ from all files 2009-04-30 13:19:35 +00:00
Tobias Brunner d25ce3701e printf hooks refactored to increase portability (i.e. support for platforms without glibc-compatible customizable printf - the Vstr string library is currently required on such platforms). 2009-03-12 18:07:32 +00:00
Tobias Brunner f30150d3da correct use of calloc in hashtable_t 2008-12-17 09:56:05 +00:00
Martin Willi 20fbc4277e fixed hashtable->get_count() after doubling table size 2008-12-09 11:13:52 +00:00
Martin Willi d21b3549f7 accept NULL values in hashtable enumerator 2008-12-05 12:34:17 +00:00
Martin Willi 19e0010f51 hashtable enumerator enumerates over both, key and values 2008-12-05 10:01:52 +00:00
Tobias Brunner ffa6450695 fixed off by one error 2008-12-04 16:33:39 +00:00
Tobias Brunner 0948edbbff adding general purpose hash table 2008-12-03 09:32:16 +00:00