JiYou
5b7e09bd6f
VersionSet: optmize GetOverlappingInputsRangeBinarySearch ( #4987 )
...
Summary:
`GetOverlappingInputsRangeBinarySearch` firstly use binary search
to find a index in the given range `[begin, end]`. But after find
the index, then use linear search to find the `start_index` and
`end_index`. So the search process degraded to linear time.
Here optmize the search process with below changes:
- use `std::lower_bound` and `std::upper_bound` to get
`lg(n)` search complexity.
- use uniformed lambda for search process.
- simplify process for `within_interval` true or false.
- remove function `ExtendFileRangeWithinInterval`
and `ExtendFileRangeOverlappingInterval`.
Signed-off-by: JiYou <jiyou09@gmail.com>
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4987
Differential Revision: D14984192
Pulled By: riversand963
fbshipit-source-id: fae4b8e59a21b7e350718d60cdc94dd55ac81e89
2019-04-17 18:15:20 -07:00
..
2019-04-10 19:31:18 -07:00
2019-04-10 19:31:18 -07:00
2018-12-13 14:21:24 -08:00
2019-03-19 09:43:22 -07:00
2019-02-14 14:41:36 -08:00
2019-04-16 23:32:20 -07:00
2019-04-16 23:32:20 -07:00
2019-02-14 14:41:36 -08:00
2018-10-08 22:54:43 -07:00
2018-12-07 17:06:02 -08:00
2017-08-19 14:10:08 -07:00
2019-02-14 14:41:36 -08:00
2019-02-11 15:01:46 -08:00
2019-02-07 16:57:33 -08:00
2019-02-14 14:41:36 -08:00
2019-03-19 17:28:19 -07:00
2019-04-10 19:31:18 -07:00
2019-03-19 17:28:19 -07:00
2019-04-16 23:32:20 -07:00
2019-04-16 23:32:20 -07:00
2019-02-14 14:41:36 -08:00
2019-02-28 10:27:59 -08:00
2018-05-29 15:44:34 -07:00
2019-04-16 23:32:20 -07:00
2019-04-16 23:32:20 -07:00
2019-02-14 11:23:55 -08:00
2018-10-09 15:19:38 -07:00
2019-02-14 14:41:36 -08:00
2018-11-09 11:19:58 -08:00
2019-02-14 14:41:36 -08:00
2019-02-14 14:41:36 -08:00
2019-04-15 11:35:21 -07:00
2017-10-17 08:57:09 -07:00
2019-02-14 14:41:36 -08:00
2019-04-12 17:07:49 -07:00
2019-02-14 14:41:36 -08:00
2019-04-16 23:32:20 -07:00
2018-11-12 16:42:16 -08:00
2018-11-09 11:19:58 -08:00
2018-11-12 12:24:26 -08:00
2018-12-13 15:12:40 -08:00
2019-04-16 23:32:20 -07:00
2019-04-16 23:32:20 -07:00
2018-08-03 17:42:34 -07:00
2019-03-28 15:17:13 -07:00
2019-04-15 18:51:04 -07:00
2019-02-28 10:27:59 -08:00
2019-03-27 16:24:45 -07:00
2019-03-26 16:45:31 -07:00
2019-03-26 16:45:31 -07:00
2019-04-15 18:51:04 -07:00
2019-04-15 11:35:21 -07:00
2019-04-16 23:32:20 -07:00
2018-10-09 17:15:51 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2018-10-29 14:36:31 -07:00
2018-05-21 14:43:11 -07:00
2019-02-14 14:41:36 -08:00
2019-04-02 14:47:16 -07:00
2018-12-17 17:33:46 -08:00
2019-04-16 11:37:47 -07:00
2019-02-14 14:41:36 -08:00
2019-02-14 14:41:36 -08:00
2019-04-02 14:47:16 -07:00
2019-03-29 10:08:50 -07:00
2019-02-15 09:51:41 -08:00
2019-04-16 23:32:20 -07:00
2019-03-26 16:45:31 -07:00
2019-04-16 23:32:20 -07:00
2019-03-01 10:42:09 -08:00
2018-09-20 15:15:28 -07:00
2018-07-17 14:43:18 -07:00
2019-04-16 23:32:20 -07:00
2019-04-11 14:28:26 -07:00
2019-04-11 14:28:26 -07:00
2019-04-11 14:28:26 -07:00
2019-02-14 14:41:36 -08:00
2018-12-28 18:02:28 -08:00
2019-04-06 06:40:36 -07:00
2018-07-13 17:42:38 -07:00
2019-03-27 16:24:45 -07:00
2019-04-11 14:28:26 -07:00
2019-04-02 21:15:44 -07:00
2018-09-17 13:14:07 -07:00
2018-10-04 20:46:50 -07:00
2018-10-04 20:46:50 -07:00
2019-04-11 14:33:49 -07:00
2018-09-15 13:43:04 -07:00
2018-04-12 17:59:16 -07:00
2019-02-14 14:41:36 -08:00
2019-03-19 17:28:19 -07:00
2019-02-12 19:16:17 -08:00
2019-04-08 11:16:34 -07:00
2019-02-14 14:41:36 -08:00
2019-02-14 14:41:36 -08:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2019-03-19 17:28:19 -07:00
2019-04-10 19:31:18 -07:00
2019-03-19 17:28:19 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2018-07-13 17:27:39 -07:00
2019-04-16 11:37:47 -07:00
2018-03-05 13:13:41 -08:00
2019-02-20 15:52:54 -08:00
2019-02-20 15:52:54 -08:00
2019-03-19 17:28:19 -07:00
2019-03-19 17:28:19 -07:00
2019-01-15 21:34:38 -08:00
2019-04-16 23:32:20 -07:00
2018-08-24 18:13:20 -07:00
2019-03-26 16:45:31 -07:00
2019-03-27 10:28:21 -07:00
2019-03-26 16:45:31 -07:00
2019-03-27 10:28:21 -07:00
2019-03-27 10:28:21 -07:00
2018-05-03 15:43:09 -07:00
2018-05-03 15:43:09 -07:00
2019-04-11 14:28:26 -07:00
2019-01-03 16:30:12 -08:00
2017-07-15 16:11:23 -07:00
2019-02-14 14:41:36 -08:00
2019-02-14 14:41:36 -08:00
2019-02-13 18:33:42 -08:00
2019-01-31 14:49:51 -08:00
2019-04-17 10:15:05 -07:00
2019-02-19 12:15:39 -08:00
2019-04-11 14:28:26 -07:00
2019-02-14 14:41:36 -08:00
2019-02-28 10:27:59 -08:00
2018-12-17 17:33:46 -08:00
2017-07-15 16:11:23 -07:00
2019-02-14 14:41:36 -08:00
2019-03-28 13:16:02 -07:00
2018-07-13 17:27:39 -07:00
2019-03-27 12:27:54 -07:00
2017-07-15 16:11:23 -07:00
2019-03-01 15:45:45 -08:00
2019-04-02 15:17:47 -07:00
2019-02-14 14:41:36 -08:00
2018-12-19 13:29:51 -08:00
2018-12-17 17:33:46 -08:00
2018-12-19 15:45:37 -08:00
2018-12-18 14:28:42 -08:00
2018-12-11 12:10:48 -08:00
2019-04-16 11:37:47 -07:00
2018-12-17 13:20:51 -08:00
2019-04-12 14:40:41 -07:00
2018-10-12 10:41:54 -07:00
2019-03-26 16:45:31 -07:00
2019-01-16 09:55:32 -08:00
2017-07-15 16:11:23 -07:00
2019-04-02 14:47:16 -07:00
2019-04-11 14:28:26 -07:00
2019-04-11 14:28:26 -07:00
2019-03-18 12:15:34 -07:00
2019-03-18 12:15:34 -07:00
2019-03-18 12:15:34 -07:00
2019-03-27 12:27:54 -07:00
2019-03-27 12:27:54 -07:00
2019-02-19 13:39:49 -08:00
2019-03-26 16:45:31 -07:00
2019-03-26 16:45:31 -07:00
2019-02-11 11:20:24 -08:00
2019-02-08 11:33:11 -08:00
2019-03-26 16:45:31 -07:00
2019-02-19 13:39:49 -08:00
2019-04-17 18:15:20 -07:00
2019-04-17 18:15:20 -07:00
2018-11-09 11:19:58 -08:00
2019-03-28 15:17:13 -07:00
2018-01-11 18:57:33 -08:00
2017-07-15 16:11:23 -07:00
2018-06-28 18:58:29 -07:00
2019-02-19 13:39:49 -08:00
2019-02-19 13:39:49 -08:00
2019-04-02 15:17:47 -07:00
2017-07-15 16:11:23 -07:00
2019-02-19 13:39:49 -08:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2018-11-07 14:07:53 -08:00
2019-01-03 12:40:42 -08:00