Nathan Bronson 9a9d4759b2 InlineSkipList part 3/3 - new skiplist type that colocates key and node
Summary:
This diff completes the creation of InlineSkipList<Cmp>, which is like
SkipList<const char*, Cmp> but it always allocates the key contiguously
with the node.  This allows us to remove the pointer from the node
to the key.  As a result the memory usage of the skip list is reduced
(by 1 to sizeof(void*) bytes depending on the padding required to align
the key storage), cache locality is improved, and we halve the number
of calls to the allocator.

For skip lists whose keys are freshly-allocated const char*,
InlineSkipList is stricly preferrable to SkipList.  This diff doesn't
replace SkipList, however, because some of the use cases of SkipList in
RocksDB are either character sequences that are not allocated at the
same time as the skip list node allocation (for example
hash_linklist_rep) or have different key types (for example
write_batch_with_index).  Taking advantage of inline allocation for
those cases is left to future work.

The perf win is biggest for small values.  For single-threaded CPU-bound
(32M fillrandom operations with no WAL log) with 16 byte keys and 0 byte
values, the db_bench perf goes from ~310k ops/sec to ~410k ops/sec.  For
large values the improvement is less pronounced, but seems to be between
5% and 10% on the same configuration.

Test Plan: make check

Reviewers: igor, sdong

Reviewed By: sdong

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D51123
2015-11-24 15:16:02 -08:00
..
2015-09-14 11:54:47 -07:00
2015-09-25 13:55:11 -07:00
2015-09-28 11:51:32 -07:00
2015-04-25 18:14:27 +09:00
2014-11-07 15:04:30 -08:00
2015-03-17 14:08:00 -07:00
2014-08-19 06:48:21 -07:00
2015-03-17 14:08:00 -07:00
2015-10-01 08:29:31 +13:00
2015-11-16 12:56:21 -08:00
2015-03-17 14:08:00 -07:00
2015-10-19 13:40:44 -07:00
2015-03-17 14:08:00 -07:00
2014-11-20 10:49:32 -08:00
2015-07-16 11:22:21 +02:00
2015-04-25 18:14:27 +09:00
2015-07-01 16:13:56 -07:00
2015-07-20 17:20:40 -07:00
2015-07-20 17:20:40 -07:00
2015-08-12 10:18:59 -07:00
2015-11-04 21:02:20 -08:00
2015-07-01 16:13:56 -07:00
2015-07-01 16:13:56 -07:00
2015-07-01 16:13:56 -07:00
2015-08-31 16:13:29 -07:00
2014-11-21 11:05:28 -05:00
2015-07-01 16:13:56 -07:00
2015-03-17 14:08:00 -07:00
2015-10-01 08:29:31 +13:00