Skip to content

Instantly share code, notes, and snippets.

@thelindat
thelindat / benchmark.lua
Last active February 16, 2024 09:46
Basic benchmarking for LuaGLM 5.4 (FiveM).
local curtime = os.nanotime
local results = {}
---@param iterations number
---@param title string | number
---@param func function
local function benchmark(iterations, title, func)
local start = curtime()
for i = 1, iterations do