for n=1,1000000 do
I named it script.lua in Windows you just double click it(assuming you have Lua already installed)
It opens in what looks like a command prompt, after the script is done the window shuts immediately so you don't have time to read all the magical numbers. I added another loop and variable to keep it on the screen long enough for me to ogle it. That looks like this:
for o=1,10000000 do
In Linux it's a bit more complicated to run it. You type this into a terminal:
lua -i script.lua
and it runs right in the terminal. I didn't have to add the extra code because it stays open.
Now for the interesting stuff!My Windows 7 box:
8 core Amd
Script run time: 429.418 seconds- more than 7 minutes!
My headless Linux Mint 10 laptop:
2 core Pentium 4
512MB ram(video shared)
Script run time: 23.95 seconds- less than 7 minutes!
So in the time it took for my Linux computer to count to a million, my far more powerful Windows computer only made it to ~54000.
I don't know what cases such a vast difference, but there it is.