title: Lua: Fastest Way to Read Data
body: <p>Here's my program.  </p>
  
  <pre><code>local t = {}
  local match = string.gmatch
  local insert = table.insert
  val = io.read("*a")
  
  for num in match(val, "%d+") do
      insert(t, num)
  end
  </code></pre>
  
  <p>I'm wondering if there is a faster way to load a large (16MB+) array of integers than this. Considering the data is composed of line after line of a single number can this be made faster?  Should I be looking at io.read("*n") instead? </p>