> > > 2) Good news! If you can rework your problem to more closely align with > the > use-cases the optimizer is tuned for you can pick up *much* more > performance. > In the spirit of offering something more concrete, try replacing your inner loop with this: local buff = ffi.new("char[64]"); local f = ffi.C.fopen("data.txt","r") for i=0,7281624-1 do ints[i] = ffi.C.atoi(ffi.C.fgets(buff,64,f)) end ffi.C.fclose(f) NOTE: There is no error checking here. If you use this in production without adding error checking then you will be making puppies and kittens sad. Please think of the innocent animals. Anyway, this gets me a ~8x global speedup relative to the io/lines iterator and the array version is ~10% faster than the table version. Demetri