Created
February 5, 2020 07:16
-
-
Save Nymphium/44a583f914e5fc863c0f72bc3848415b 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() return error() endlocal socket = require('socket') | |
local gettime = socket.gettime | |
local TIMES = 1000000 | |
local t1 = gettime() | |
for _ = 1, TIMES do | |
pcall(error) | |
end | |
local t2 = gettime() | |
local t3 = gettime() | |
for _ = 1, TIMES do | |
pcall(function() return 3 / 1 end) | |
end | |
local t4 = gettime() | |
local t5 = gettime() | |
for _ = 1, TIMES do | |
pcall(function() return 3 / 0 end) | |
end | |
local t6 = gettime() | |
print(t2 - t1, t4 - t3, t6 - t5) |
Author
Nymphium
commented
Feb 5, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment