summaryrefslogtreecommitdiff
path: root/lib/ccan/htable
AgeCommit message (Collapse)AuthorFilesLines
2011-12-05lib/ccan/htable: benchmark against hsearch(3)Rusty Russell3-2/+108
Since that has a fixed hash table size and doesn't support delete, we can't do a thorough comparison, but we can insert and search. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 95757f0e9d979e7c653e9b53bb640deb4f0ea1f9)
2011-12-05lib/ccan/htable: HTABLE_INITIALIZER() for static initialization.Rusty Russell3-15/+29
Unfortunately it's a bit of a pain to use for typed hashtables, but it works. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 60cc720d0797fc49325437ea36a9ffd909c75ed0)
2011-12-05lib/ccan/htable: clean up interface, document htable_type better.Rusty Russell9-254/+251
We change from htable_new()/htable_free() to htable_init/htable_clear. We also change HTABLE_DEFINE_TYPE() to be the full name, without automatically prepending htable_. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 0c3590dc33d644f73bb8587db454c491830aaf26)
2011-12-05lib/ccan/htable: start empty.Rusty Russell4-39/+87
There's no real reason to start with 128 entries. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 45f24da35118db441e6153f02f6ddd937da1fa1c)
2011-12-05lib/ccan/htable, strset: benchmarking tools.Rusty Russell2-1/+260
This lets us compare hash table vs. strset vs. the example implementation of critbit trees. cbspeed 100 runs, min-max(avg): #01: Initial insert: 236-245(237) #02: Initial lookup (match): 180-186(180) #03: Initial lookup (miss): 171-185(172) #04: Initial lookup (random): 441-457(444) #05: Initial delete all: 127-132(128) #06: Initial re-inserting: 219-225(220) #07: Deleting first half: 101-104(102) #08: Adding (a different) half: 158-162(159) #09: Lookup after half-change (match): 202-207(203) #10: Lookup after half-change (miss): 217-222(218) #11: Churn 1: 297-302(299) #12: Churn 2: 297-305(300) #13: Churn 3: 301-308(303) #14: Post-Churn lookup (match): 189-195(190) #15: Post-Churn lookup (miss): 189-193(190) #16: Post-Churn lookup (random): 499-513(503) speed 100 runs, min-max(avg): #01: Initial insert: 211-218(212) #02: Initial lookup (match): 161-166(162) #03: Initial lookup (miss): 157-162(158) #04: Initial lookup (random): 452-460(454) #05: Initial delete all: 126-135(127) #06: Initial re-inserting: 193-201(194) #07: Deleting first half: 99-107(99) #08: Adding (a different) half: 143-190(144) #09: Lookup after half-change (match): 183-195(184) #10: Lookup after half-change (miss): 197-203(198) #11: Churn 1: 271-278(274) #12: Churn 2: 280-287(282) #13: Churn 3: 277-285(279) #14: Post-Churn lookup (match): 171-175(171) #15: Post-Churn lookup (miss): 174-178(175) #16: Post-Churn lookup (random): 525-552(528) stringspeed 100 runs, min-max(avg): #01: Initial insert: 300-343(308) #02: Initial lookup (match): 98-136(99) #03: Initial lookup (miss): 73-102(75) #04: Initial lookup (random): 230-282(233) #05: Initial delete all: 66-102(69) #06: Initial re-inserting: 62-99(64) #07: Deleting first half: 43-52(43) #08: Adding (a different) half: 101-156(106) #09: Lookup after half-change (match): 114-156(120) #10: Lookup after half-change (miss): 94-103(95) #11: Churn 1: 98-105(99) #12: Churn 2: 96-104(98) #13: Churn 3: 174-184(176) #14: Post-Churn lookup (match): 93-112(94) #15: Post-Churn lookup (miss): 77-107(79) #16: Post-Churn lookup (random): 229-265(232) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 5c559e7df1d31b4c0ddf26451fac972dc8a0c2c9)
2011-12-05lib/ccan/htable: fix tools/speed.Rusty Russell1-2/+3
As pointed out by Christian Thaeter, it has bitrotted. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit f725bbb1987284933e0f21dfb8f2ce7a1f0806e5)
2011-07-25lib/ccan: update to init-1192-gdd04041Rusty Russell5-255/+429
This imports licensing clarifications and updates as discussed on samba-technical ("Subject: Re: ccan code breaks older build farm systems"). In particular, the recent version have per-file license markers, and some modules are relicenced more liberally: in particular Simo pointed out that htable was GPL, and indirectly included by libtdb2, which would have made that GPL as well. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Mon Jul 25 12:03:40 CEST 2011 on sn-devel-104
2011-06-20lib: import ccan modules for tdb2Rusty Russell9-0/+1713
Imported from git://git.ozlabs.org/~ccan/ccan init-1161-g661d41f Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>