• Ariel Shtul's avatar
    [PERF] use snprintf once in addReplyDouble (#11093) · 90223759
    Ariel Shtul authored
    The previous implementation calls `snprintf` twice, the second time used to
    'memcpy' the output of the first, which could be a very large string.
    The new implementation reserves space for the protocol header ahead
    of the formatted double, and then prepends the string length ahead of it.
    
    Measured improvement of simple ZADD of some 25%.
    90223759
networking.c 170 KB