• antirez's avatar
    ZUNIONSTORE reimplemented for speed. · 932cc3eb
    antirez authored
    The user @kjmph provided excellent ideas to improve speed of ZUNIONSTORE
    (in certain cases by many order of magnitude), together with an
    implementation of the ideas.
    
    While the ideas were sounding, the implementation could be improved both
    in terms of speed and clearness, so that's my attempt at reimplementing
    the speedup proposed, trying to improve by directly using just a
    dictionary with an embedded score inside, and reusing the single-pass
    aggregate + order-later approach.
    
    Note that you can't apply this commit without applying the previous
    commit in this branch that adds a double in the dictEntry value union.
    
    Issue #1786.
    932cc3eb
t_zset.c 91.5 KB