title: Redis Lua scripting with large loops
body: <p>Which of the following loops will run quicker in a Redis Lua Script for  10,000 iterations. Or will they both run at the same speed.</p>
  
  <p>Does accessing a redis key inside a lua script take the same amount of time as accessing a local variable, e.g a value at a specific index of a table.</p>
  
  <pre><code>local members = redis.pcall('smembers','10000memberset')
  
  for i=1,table.getN(members) do
  
   local value = members[i]
    -- do some logic on the value
  
  end
  </code></pre>
  
  <p>or</p>
  
  <pre><code>for i=1,10000 do
  
    local value = redis.pcall('get',i) 
    -- do some logic on the value
  
  end
  </code></pre>
  
  <p>Thanks!</p>