Created
May 24, 2018 20:31
-
-
Save Sleitnick/70e32ff9a20e25d3fe36bcd413ab8296 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Benchmark(title, iterations, func) | |
print("Running " .. title .. "...") | |
local start = tick() -- Start time | |
for i = 1,iterations do | |
func() | |
end | |
local duration = (tick() - start) | |
print(title .. " duration: " .. duration) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment