redict/tests/unit/type
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
..
hash.tcl Updating missing test cases for Hash commands (#12116) 2023-05-01 21:00:07 +03:00
incr.tcl add test cases for decr decrby on missing key (#12070) 2023-04-19 09:55:56 +03:00
list-2.tcl Minor improvements for list-2 test (#8156) 2020-12-08 16:26:38 +02:00
list-3.tcl Fix quicklist node not being recompressed correctly after inserting a new node before or after it (#10120) 2022-01-16 08:54:40 +02:00
list-common.tcl Add listpack encoding for list (#11303) 2022-11-16 20:29:46 +02:00
list.tcl Fix bug: LPOS RANK LONG_ MIN causes overflow (#12167) 2023-05-14 09:04:33 +03:00
set.tcl Fix for set max entries edge case in setTypeCreate / setTypeMaybeConvert (#12183) 2023-05-16 11:32:21 -07:00
stream-cgroups.tcl reprocess command when client is unblocked on keys (#11012) 2023-01-01 23:35:42 +02:00
stream.tcl Fix XSETID with max_deleted_entry_id issue (#11444) 2022-11-02 16:16:16 +02:00
string.tcl adding missing test cases GET and GETEX (#12125) 2023-05-07 11:46:11 +03:00
zset.tcl Performance improvement to ZADD and ZRANGESTORE, convert to skiplist and expand dict in advance (#12185) 2023-05-18 15:24:46 +03:00