Perf: ImVec2/ImVec4/ImRect store named fields (no metamethod per .x/.Min), bench flags --roblox/--open-only

This commit is contained in:
4DBug
2026-10-08 10:16:40 -05:00
parent 7a20710b65
commit 623dc5b936
9 changed files with 299 additions and 419 deletions
+1 -1
View File
@@ -1629,7 +1629,7 @@ local function StyleCopy(dst, src)
elseif type(v) == "table" and getmetatable(v) ~= nil and type(v[1]) == "number" then
local c = dst[k]
if type(c) ~= "table" then c = setmetatable({}, getmetatable(v)); dst[k] = c end
for i = 1, #v do rawset(c, i, v[i]) end
for _, key in ipairs({ "x", "y", "z", "w" }) do if rawget(v, key) ~= nil then c[key] = v[key] end end
else
dst[k] = v
end