From: Rusty Russell Date: Mon, 22 Nov 2010 01:20:58 +0000 (+1030) Subject: tdb2: use expansion heuristics from tdb1 X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=20defbbcfa088a7574d9897b533d1bc600b2df53;hp=20defbbcfa088a7574d9897b533d1bc600b2df53;p=ccan tdb2: use expansion heuristics from tdb1 This reduces the amount of expansion we do. Before: ./speed 1000000 Adding 1000000 records: 23210 ns (59193360 bytes) Finding 1000000 records: 2387 ns (59193360 bytes) Traversing 1000000 records: 2150 ns (59193360 bytes) Deleting 1000000 records: 13392 ns (59193360 bytes) Re-adding 1000000 records: 11546 ns (59193360 bytes) Appending 1000000 records: 29327 ns (91193360 bytes) Churning 1000000 records: 33026 ns (91193360 bytes) After: $ ./speed 1000000 Adding 1000000 records: 17480 ns (61472904 bytes) Finding 1000000 records: 2431 ns (61472904 bytes) Traversing 1000000 records: 2194 ns (61472904 bytes) Deleting 1000000 records: 10948 ns (61472904 bytes) Re-adding 1000000 records: 11247 ns (61472904 bytes) Appending 1000000 records: 21826 ns (96051424 bytes) Churning 1000000 records: 27242 ns (96051424 bytes) ---