mapleFU commented on code in PR #2627:
URL: https://github.com/apache/kvrocks/pull/2627#discussion_r1820000332


##########
src/server/redis_reply.cc:
##########
@@ -37,9 +37,23 @@ namespace redis {
 
 void Reply(evbuffer *output, const std::string &data) { evbuffer_add(output, 
data.c_str(), data.length()); }
 
-std::string SimpleString(const std::string &data) { return "+" + data + CRLF; }
+std::string SimpleString(const std::string &data) { 

Review Comment:
   > However, I saw that const string& is widely used in the code, so I assumed 
it was a stylistic choice and didn't make the change.
   
   Previously `+` for string_view would be a bit trick, but now there is no 
reason not shift to that. For sso string the performance might be same but for 
long string `string_view` would have better performance



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to