• Filipe Oliveira (Redis)'s avatar
    Reduce getNodeByQuery overhead (#13221) · 26a2dcb9
    Filipe Oliveira (Redis) authored
    
    
    The following PR does the following changes based upon on CPU profile
    info. The `getNodeByQuery` function represents 8.2% of an overhead of
    12.3% when comparing single shard cluster with standalone.
    Proposed changes:
    - inlinging keyHashSlot to reduce overhead of that function call
    - Reduce duplicate calls to getCommandFlags within getNodeByQuery
    
    The above changes represent an improvement of approximately 5% on the achievable ops/sec.
    Co-authored-by: default avatarfilipecosta90 <filipecosta.90@gmail.com>
    26a2dcb9
cluster.c 54.9 KB