由于Redis尝试将字符串解析为64位有符号整数,因此存储32位有符号整数的二进制表示而不是基数10整数字符串是个好主意吗?
在我们的系统中,我们列出了许多32位有符号整数ID.
I can store them like
lpush mykey 102450 --> redis cast 102450 to 8 bytes long
or store it like
lpush mykey \x00\x01\x19\x32 ---> this is just 4 bytes
Run Code Online (Sandbox Code Playgroud) redis ×1