Tuesday, January 2, 2024

Simple Lua benchmark

Start a Lua interpreter and paste the following in it:

l=os.time() m=0 c=0 while true do n=os.time() if n~=l then l=n m=math.max(m,c) print("Currently: "..c,math.floor(0.5+c*100/m).."% of maximum "..m) c=0 end c=c+1 end

It will show you the current cycles per second and what percentage of the maximum cycles per seconds it is since you started running it.

No comments:

Post a Comment

Popular Posts