require 'redis'
redis = Redis.new
#存值
st = Time.now
10000.times{|i| redis.rpush('speed','speed #{i}')}
et = Time.now
p (et - st)
#取值
st = Time.now
redis.lrange('speed',0,-1)
et = Time.now
p (et-st)
1000.times
10000.times
require 'redis'
redis = Redis.new
#存值
st = Time.now
10000.times{|i| redis.rpush('speed','speed #{i}')}
et = Time.now
p (et - st)
#取值
st = Time.now
redis.lrange('speed',0,-1)
et = Time.now
p (et-st)
1000.times
10000.times