3 ms·
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
by ntoshev 15y ago
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.
- antirez 15y agoIf you don't have a network interface, is not the same thing as Redis. Even Redis can be written as a C library, but it's not the same. Redis is all about a shared persistent state. 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.