Add vector lib micro benchmark (just vector.create at this point)

This commit is contained in:
Petri Häkkinen 2024-12-17 10:51:30 +02:00
parent 21998aa342
commit 81488f1fe4

View file

@ -0,0 +1,14 @@
local function prequire(name) local success, result = pcall(require, name); return success and result end
local bench = script and require(script.Parent.bench_support) or prequire("bench_support") or require("../bench_support")
bench.runCode(function()
for i=1,1000000 do
vector.create(i, 2, 3)
vector.create(i, 2, 3)
vector.create(i, 2, 3)
vector.create(i, 2, 3)
vector.create(i, 2, 3)
end
end, "vector: create")
-- TODO: add more tests