Islam AbdelRahman
4a21b1402c
Cache heap::downheap() root comparison (optimize heap cmp call)
...
Summary:
Reduce number of comparisons in heap by caching which child node in the first level is smallest (left_child or right_child)
So next time we can compare directly against the smallest child
I see that the total number of calls to comparator drops significantly when using this optimization
Before caching (~2mil key comparison for iterating the DB)
```
$ DEBUG_LEVEL=0 make db_bench -j64 && ./db_bench --benchmarks="readseq" --db="/dev/shm/heap_opt" --use_existing_db --disable_auto_compactions --cache_size=1000000000 --perf_level=2
readseq : 0.338 micros/op 2959201 ops/sec; 327.4 MB/s user_key_comparison_count = 2000008
```
After caching (~1mil key comparison for iterating the DB)
```
$ DEBUG_LEVEL=0 make db_bench -j64 && ./db_bench --benchmarks="readseq" --db="/dev/shm/heap_opt" --use_existing_db --disable_auto_compactions --cache_size=1000000000 --perf_level=2
readseq : 0.309 micros/op 3236801 ops/sec; 358.1 MB/s user_key_comparison_count = 1000011
```
It also improves
Closes https://github.com/facebook/rocksdb/pull/1600
Differential Revision: D4256027
Pulled By: IslamAbdelRahman
fbshipit-source-id: 76fcc66
2016-12-01 13:39:14 -08:00
..
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-10-28 10:44:52 -07:00
2016-02-09 15:12:00 -08:00
2016-05-20 07:42:18 -07:00
2016-11-15 20:24:13 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-10-25 11:31:39 -07:00
2016-02-09 15:12:00 -08:00
2016-08-19 12:28:19 -07:00
2016-08-29 10:40:00 -07:00
2016-11-21 12:24:13 -08:00
2016-11-21 12:24:13 -08:00
2016-02-09 15:12:00 -08:00
2016-08-31 08:56:34 -07:00
2016-08-19 12:28:19 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-08-19 15:10:31 -07:00
2016-08-16 08:21:43 -07:00
2016-04-25 23:02:14 -07:00
2016-11-21 12:24:14 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-11-14 22:54:17 -08:00
2016-11-14 22:54:17 -08:00
2016-10-18 16:59:37 -07:00
2016-10-24 10:35:00 -07:00
2016-10-24 10:35:00 -07:00
2016-07-08 17:50:51 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-08-19 15:10:31 -07:00
2016-09-13 12:08:22 -07:00
2016-05-06 17:42:50 -07:00
2016-09-07 12:37:45 -07:00
2016-11-21 12:24:13 -08:00
2016-11-18 17:24:13 -08:00
2016-10-28 10:36:05 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-05-10 14:06:07 -07:00
2016-05-10 14:06:07 -07:00
2016-02-09 15:12:00 -08:00
2016-08-05 10:31:41 -07:00
2016-08-05 10:31:41 -07:00
2016-09-23 16:34:04 -07:00
2016-09-23 16:34:04 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-11-19 11:39:15 -08:00
2016-12-01 10:09:22 -08:00
2016-11-13 19:09:18 -08:00
2016-02-09 15:12:00 -08:00
2016-12-01 13:39:14 -08:00
2016-03-11 22:56:25 -08:00
2016-03-17 14:28:41 -07:00
2016-03-11 16:54:25 -08:00
2016-03-15 11:38:15 -07:00
2016-03-11 16:54:25 -08:00
2016-10-24 10:35:00 -07:00
2016-02-09 15:12:00 -08:00
2016-11-18 19:24:13 -08:00
2016-11-18 17:24:13 -08:00
2016-02-09 15:12:00 -08:00
2016-02-23 10:26:24 -08:00
2016-02-23 10:26:24 -08:00
2016-11-09 15:09:18 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-10-11 16:45:51 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-08-19 16:43:31 -07:00
2016-08-23 13:53:49 -07:00
2016-08-23 13:44:13 -07:00
2016-05-27 12:10:26 -07:00
2016-11-15 20:24:13 -08:00
2016-06-03 15:13:03 -07:00
2016-05-27 12:10:26 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-07-19 12:01:46 -07:00
2016-11-14 22:54:17 -08:00
2016-11-14 22:54:17 -08:00
2016-10-14 13:09:18 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-11-13 19:09:18 -08:00
2016-11-28 16:39:14 -08:00
2016-11-23 09:24:15 -08:00
2016-02-17 20:22:40 +08:00
2016-11-28 10:24:11 -08:00
2016-02-09 15:12:00 -08:00
2016-06-01 09:07:09 -07:00
2016-02-09 15:12:00 -08:00
2016-10-29 16:09:18 -07:00
2016-02-09 15:12:00 -08:00
2016-03-16 22:57:57 +01:00
2016-10-13 14:26:12 -07:00
2016-07-01 00:16:29 -07:00
2016-05-27 16:15:28 -07:00
2016-09-01 13:50:39 -07:00
2016-09-01 13:50:39 -07:00
2016-02-09 15:12:00 -08:00
2016-06-10 16:37:36 -07:00
2016-02-18 11:25:19 -08:00
2016-02-17 15:20:23 -08:00
2016-07-25 16:05:50 -07:00
2016-11-20 18:24:12 -08:00
2016-10-11 10:54:11 -07:00
2016-09-07 12:37:45 -07:00
2016-09-07 12:37:45 -07:00
2016-04-01 11:06:06 -07:00
2016-08-02 14:53:29 -07:00
2016-02-09 15:12:00 -08:00
2016-06-29 07:35:17 -07:00
2016-08-16 06:19:46 -07:00
2016-07-07 11:29:14 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-11-02 15:39:18 -07:00
2016-10-18 16:59:37 -07:00
2016-02-09 15:12:00 -08:00
2016-08-23 13:34:56 -07:00
2016-10-29 12:09:17 -07:00
2016-08-22 15:37:39 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-03-04 16:03:31 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-09-02 17:10:28 -07:00
2016-08-26 10:41:35 -07:00
2016-03-11 15:16:52 -08:00
2016-03-15 10:57:33 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2015-11-18 16:23:19 -08:00
2015-03-12 12:07:10 -07:00