dellingr 0.1.0

An embeddable, pure-Rust Lua VM with precise instruction-cost accounting
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- Sibling of vararg.lua: equivalent total work but with fixed
-- arity, isolating the vararg dispatch overhead.

local function sum_four(a, b, c, d)
    return a + b + c + d
end

function _bench()
    local total = 0
    for i = 1, 500 do
        total = total + sum_four(1, 2, 3, 4)
    end
    return total
end

for i = 1, 2500 do _bench() end
print("calls/fixedarg: true")