Lipeng Zhu 076bf6605f
Move prepareClientToWrite out of loop for lrange command to reduce the redundant call. (#860)
## Description 
When I explore the cycles distributions for `lrange` test (
`valkey-benchmark -p 9001 -t lrange -d 100 -r 1000000 -n 1000000 -c 50
--threads 4`). I found the `prepareClientToWrite` and
`clientHasPendingReplies` could be reduced to single call outside
instead of called in a loop, ideally we can gain 3% performance. The
corresponding `LRANG_100`, `LRANG_300`, `LRANGE_500`, `LRANGE_600` have
~2% - 3% performance boost, the benchmark test prove it helps.

This patch try to move the `prepareClientToWrite` and its child
`clientHasPendingReplies` out of the loop to reduce the function
overhead.

---------

Signed-off-by: Lipeng Zhu <lipeng.zhu@intel.com>
2024-08-27 19:11:09 -07:00
..
2024-06-03 12:22:06 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-06-07 01:40:55 +02:00
2024-05-22 23:24:12 -07:00
2024-07-18 19:21:45 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-06-07 01:40:55 +02:00
2024-05-22 23:24:12 -07:00
2021-07-10 10:04:54 -05:00
2024-08-27 16:11:33 +02:00
2024-05-22 23:24:12 -07:00
2024-08-27 16:11:33 +02:00