mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
48757934ff
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 |
||
---|---|---|
.. | ||
hash.tcl | ||
incr.tcl | ||
list-2.tcl | ||
list-3.tcl | ||
list-common.tcl | ||
list.tcl | ||
set.tcl | ||
stream-cgroups.tcl | ||
stream.tcl | ||
string.tcl | ||
zset.tcl |