Optimize the performance of sdscatrepr in printable characters#11725
Conversation
Automated performance analysis summaryThis comment was automatically generated given there is performance data available. Using platform named: amd64-aws-m6i.8xlarge to do the comparison. In summary:
Comparison between unstable and judeng:sdscatrepr.Time Period from a month ago. (environment used: oss-standalone)
|
|
@judeng / @zuiderkwast / @artikell looking at the performance data there is no significant change on the benchmarks detected ( I'm extending the runs to include all 60 benchmarks ). |
|
@filipecosta90 As @judeng wrote in the top comment (quoted) this is not in the hot path of redis, so it's unlikely to affect performance.
Maybe it affects performance of redis-cli or some external tools which copy the sds library such as hiredis... @judeng anything in particular you're using this for? Anyway, I think this change is also a simplification of the code, so it can be worth merging anyway. |
|
|
|
i use unstable(no monitor) unstable(1monitor) judeng:sdscatrepr(no monitor) judeng:sdscatrepr(1 monitor) roughly 34% improvement。 |
|
@artikell Thanks for your test, the optimization of monitor was a surprise to me :-) |
|
@filipecosta90 Thank you for the benchmark results you shared, I did not perform benchmark tests on redis, but only pressure tested the function in my project, which showed a great performance improvement. |
|
@zuiderkwast I am trying to make a tool based sds to audit redis's requests |
oranagra
left a comment
There was a problem hiding this comment.
LGTM, seems like a straight forward improvement and doesn't add any complexity.
even if it's not measurable in most workflows, i think we should take it.
…#11725) sdscatrepr is not the hot path in redis, but it's still useful to have make it less wasteful.
sdscatrepris not the hot path in redis, but it helpful for some project with sds.c, so it is still worth optimizing its performance