tagged table pools, table.new/clear to speed them up

This commit is contained in:
BlackMATov
2025-01-02 03:17:05 +07:00
parent 82d522704d
commit ef0d86b0ce
4 changed files with 173 additions and 68 deletions
+28
View File
@@ -2256,6 +2256,34 @@ do
end
end
do
local f1, f2, f3 = evo.id(3)
local q = evo.id()
evo.set(q, evo.INCLUDE_LIST, f1)
local e1 = evo.id()
assert(evo.insert(e1, f1, 41))
assert(evo.insert(e1, f2, 42))
local e2 = evo.id()
assert(evo.insert(e2, f1, 43))
assert(evo.insert(e2, f3, 44))
do
local entity_sum = 0
for _, entities in evo.execute(q) do
assert(#entities > 0)
for _, e in ipairs(entities) do
entity_sum = entity_sum + e
end
end
assert(entity_sum == e1 + e2)
end
end
do
local f1, f2 = evo.id(2)