Given that you're working on a modern computer (pentium or newer) the switch to integer might actually be very slightly slower.Would recompiling the lua interpreter to use integer arithmetic make an appreciable difference? My program doesn't use maths very much.