redis / rueidis

A fast Golang Redis client that supports Client Side Caching, Auto Pipelining, Generics OM, RedisJSON, RedisBloom, RediSearch, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

will be using rueidis a lot but is there a way to have zero allocation? e.g. command etc

ouvaa opened this issue · comments

in a high performance setting, how to achieve zero alloc using rueidis? or what sort of commands will i be limited to if i need zero allocation?

p.s. : i just saw a discussion tab, pls help move this there. thx.

Hi @ouvaa,

The command builder of rueidis recycles all successful commands. You can treat this as an amortized zero allocation.

On the response side, All OK responses will not need additional allocation. For example, the benchmark of SET command in https://github.com/rueian/rueidis-benchmark shows amortized zero allocation.

@rueian ok. maybe can explore making goasm or c->goasm or somewhere along that line in future. truly hope for zero alloc.

it's fantastic as it is this rueidis package.