vseloved / cl-redis

Redis client for Common Lisp
Other
188 stars 38 forks source link

Improve communication speed #22

Closed orivej closed 10 years ago

orivej commented 10 years ago

First of all, a disclaimer. I'm only evaluating redis, and have almost no experience with it yet.

This patch resulted from the desire to make cl-redis faster than Ruby redis in the benchmark at http://redis.io/topics/pipelining. You can see benchmark results (seconds after three runs, and allocated memory) at https://github.com/orivej/cl-redis/blob/bench/bench.org.

All tests still pass, but redis_version test had to be adjusted for red-info now returning #\Return#\Newline-separated lines, because it is defined as a bulk-output command, and they don't deform strings in the patched version anymore. This is an incompatible change: if in the original version of cl-redis I put a value of A#\Return#\NewlineB, it will be stored as A\r\r\nB, and in the patched version returned as A#\Return#\Return#\NewlineB. Backwards compatible but slower patch is in the flex branch.