Redis is i/o bound, while this approach eliminates i/o and copying data from Redis to the client ;)
Not sure about memory efficiency. You can use __slots__ in Python or custom data structures (e.g. blist) if you have specific needs.
Not sure about memory efficiency. You can use __slots__ in Python or custom data structures (e.g. blist) if you have specific needs.
I've no idea about __slots__, just a feeling that there are too much underscores to work well ;) But in general to get as memory efficient as Redis in a scripting language is very hard for different (good) reasons.