Binbin
48757934ff
Performance improvement to ZADD and ZRANGESTORE, convert to skiplist and expand dict in advance ( #12185 )
...
For zsets that will eventually be stored as the skiplist encoding (has a dict),
we can convert it to skiplist ahead of time. This change checks the number
of arguments in the ZADD command, and converts the data-structure
if the number of new entries exceeds the listpack-max-entries configuration.
This can cause us to over-allocate memory if there are duplicate entries in the
input, which is unexpected.
For ZRANGESTORE, we know the size of the zset, so we can expand
the dict in advance, to avoid the temporary dict from being rehashed
while it grows.
Simple benchmarks shows it provides some 4% improvement in ZADD and 20% in ZRANGESTORE
2023-05-18 15:24:46 +03:00
..
2023-05-17 10:26:02 +03:00
2022-04-05 17:08:27 +03:00
2023-05-02 17:31:32 -07:00
2023-01-20 13:18:52 -08:00
2022-11-23 17:39:08 +02:00
2021-04-26 15:52:06 +03:00
2022-01-30 19:43:37 +02:00
2021-09-02 11:07:51 +03:00
2022-06-07 14:47:09 +03:00
2023-04-23 17:02:09 +03:00
2022-01-18 13:10:07 +02:00
2023-04-17 21:05:36 +03:00
2023-04-17 21:05:36 +03:00
2023-05-02 17:31:32 -07:00
2021-03-10 19:11:16 +02:00
2022-08-03 19:38:08 +03:00
2023-03-14 20:26:21 +02:00
2023-03-14 20:26:21 +02:00
2022-10-02 15:15:14 +03:00
2023-05-08 16:12:44 -07:00
2023-03-16 14:04:31 +02:00
2023-03-16 14:04:31 +02:00
2022-11-12 20:35:34 +02:00
2023-03-30 19:03:56 +03:00
2023-03-30 19:03:56 +03:00
2023-05-02 17:31:32 -07:00
2023-05-02 17:31:32 -07:00
2023-05-02 17:31:32 -07:00
2023-05-02 17:31:32 -07:00
2023-03-30 19:03:56 +03:00
2023-05-10 08:26:46 +03:00
2023-03-30 19:03:56 +03:00
2023-05-02 17:31:32 -07:00
2023-04-18 09:53:51 +03:00
2023-05-02 17:31:32 -07:00
2023-05-02 17:31:32 -07:00
2021-06-10 15:39:33 +03:00
2019-03-01 17:53:14 +01:00
2021-11-16 08:55:10 +02:00
2021-11-16 08:55:10 +02:00
2021-06-10 15:39:33 +03:00
2020-04-24 17:11:21 -07:00
2023-05-09 14:24:37 +03:00
2023-05-08 08:31:58 +03:00
2022-02-06 20:13:34 -08:00
2023-05-02 17:31:32 -07:00
2023-04-18 17:17:22 +03:00
2023-01-20 18:45:29 +02:00
2022-07-18 10:56:26 +03:00
2021-11-16 08:55:10 +02:00
2023-05-02 17:31:32 -07:00
2023-05-02 17:31:32 -07:00
2023-02-20 10:23:25 +02:00
2023-04-18 09:53:51 +03:00
2023-05-02 17:31:32 -07:00
2023-05-02 17:31:32 -07:00
2023-05-02 17:31:32 -07:00
2023-05-09 14:24:37 +03:00
2022-12-05 15:45:04 +02:00
2021-04-29 08:25:10 +03:00
2022-04-04 15:35:49 +03:00
2022-02-08 16:49:47 +02:00
2023-03-16 08:50:32 +02:00
2022-11-09 19:50:07 +02:00
2022-11-09 19:50:07 +02:00
2023-05-12 20:13:15 +03:00
2023-05-12 20:13:15 +03:00
2023-05-02 17:31:32 -07:00
2023-04-10 20:38:40 +03:00
2023-05-02 17:31:32 -07:00
2022-12-06 11:25:51 +02:00
2022-03-09 13:58:23 +02:00
2023-04-20 23:28:44 +03:00
2021-06-10 15:39:33 +03:00
2021-06-10 15:39:33 +03:00
2021-06-10 15:39:33 +03:00
2020-05-05 23:35:08 -04:00
2021-11-16 13:12:25 +02:00
2021-11-16 13:12:25 +02:00
2021-11-16 13:12:25 +02:00
2021-11-16 13:12:25 +02:00
2023-05-02 17:31:32 -07:00
2021-11-11 13:51:33 +02:00
2022-08-23 12:37:56 +03:00
2023-05-11 18:16:08 +03:00
2023-05-02 17:31:32 -07:00
2023-05-02 17:31:32 -07:00
2020-12-23 15:52:07 +02:00
2020-12-23 15:52:07 +02:00
2023-02-28 12:02:55 +02:00
2023-05-02 17:31:32 -07:00
2022-04-17 15:43:22 +03:00
2023-03-07 15:06:53 -08:00
2022-04-04 18:38:18 +03:00
2023-05-02 17:31:32 -07:00
2022-11-16 20:29:46 +02:00
2022-11-16 20:29:46 +02:00
2023-05-02 17:31:32 -07:00
2023-05-02 17:31:32 -07:00
2022-10-02 13:56:45 +03:00
2020-09-10 13:43:38 +03:00
2023-04-17 21:05:36 +03:00
2023-04-09 12:07:32 +03:00
2023-05-02 17:31:32 -07:00
2023-04-17 21:05:36 +03:00
2023-04-17 21:05:36 +03:00
2023-05-11 08:14:59 +03:00
2021-11-11 13:51:33 +02:00
2022-06-19 08:42:12 +03:00
2023-05-02 17:31:32 -07:00
2022-08-23 12:37:56 +03:00
2023-05-18 09:25:56 +03:00
2023-03-15 11:05:42 +02:00
2022-04-10 09:29:50 +03:00
2023-02-12 09:23:29 +02:00
2023-02-12 09:23:29 +02:00
2023-03-15 11:05:42 +02:00
2022-04-27 00:37:40 +03:00
2023-05-02 17:31:32 -07:00
2023-05-02 17:31:32 -07:00
2023-01-31 17:26:35 +02:00
2023-01-31 17:26:35 +02:00
2020-12-06 14:54:34 +02:00
2023-05-17 10:26:02 +03:00
2023-05-12 20:13:15 +03:00
2023-05-18 09:23:21 +03:00
2020-10-25 14:14:05 +02:00
2021-02-23 12:57:45 +02:00
2022-11-24 15:27:16 +02:00
2023-04-18 09:53:51 +03:00
2021-11-11 13:51:33 +02:00
2021-07-10 10:04:54 -05:00
2021-11-11 13:51:33 +02:00
2023-04-25 10:17:21 +03:00
2021-12-15 21:23:15 +02:00
2023-05-02 17:31:32 -07:00
2023-01-16 13:49:30 +02:00
2023-03-09 12:05:50 +02:00
2022-11-30 14:21:31 +02:00
2022-07-18 10:56:26 +03:00
2023-01-22 16:32:20 +02:00
2022-05-22 17:10:31 +03:00
2023-05-16 11:32:21 -07:00
2023-05-14 09:04:33 +03:00
2023-05-16 11:32:21 -07:00
2023-03-08 11:57:32 +02:00
2023-03-20 18:50:44 +02:00
2023-05-18 15:24:46 +03:00
2023-02-16 10:50:58 +02:00
2023-01-08 01:02:48 -08:00
2023-05-02 17:31:32 -07:00
2023-03-12 17:50:44 +02:00
2023-05-02 17:31:32 -07:00
2023-02-28 15:15:26 +02:00
2023-02-12 09:23:29 +02:00
2020-12-06 14:54:34 +02:00
2020-10-11 17:21:58 +03:00
2023-05-02 17:31:32 -07:00
2021-11-16 08:55:10 +02:00
2021-11-16 08:55:10 +02:00
2021-11-16 08:55:10 +02:00
2023-05-02 17:31:32 -07:00
2023-05-02 17:31:32 -07:00