Improve ziplistRandomPairs code logic (#8851)
After sorting, each item in picks is sorted according
to its index.
In the original code logic, we traverse from the first
element of ziplist until `zipindex == picks[pickindex].index`.
We may be able to start directly in `picks[0].index`,
this will bring small performance improvement.
Signed-off-by:
ZheNing Hu <adlternative@gmail.com>
Please register or sign in to comment