Speaking of optimization: what is a good precise way to measure the time in Codea?
os.time seems to return time in seconds since the Unix epoch, it seems, but stored in a float. The precision of the float mantissa isn’t enough, so os.difftime returns zero for small intervals.
os.clock returns weird things - at least they increase monotonically.
It would be nice to have a function that returns precise milliseconds since the start of the game (not the start of Codea).