mirror of
https://github.com/BlackMATov/evolved.lua.git
synced 2025-12-13 03:29:08 +07:00
add defer clone bmarks
This commit is contained in:
@@ -28,6 +28,21 @@ basics.describe_bench(string.format('Clone Benchmarks: Simple Clone | %d entitie
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Simple Defer Clone | %d entities with 1 component', N),
|
||||
function()
|
||||
local clone = evo.clone
|
||||
|
||||
local prefab = evo.spawn { [F1] = true }
|
||||
|
||||
evo.defer()
|
||||
for _ = 1, N do
|
||||
clone(prefab)
|
||||
end
|
||||
evo.commit()
|
||||
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Simple Clone | %d entities with 3 components', N),
|
||||
function()
|
||||
local clone = evo.clone
|
||||
@@ -41,6 +56,21 @@ basics.describe_bench(string.format('Clone Benchmarks: Simple Clone | %d entitie
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Simple Defer Clone | %d entities with 3 components', N),
|
||||
function()
|
||||
local clone = evo.clone
|
||||
|
||||
local prefab = evo.spawn { [F1] = true, [F2] = true, [F3] = true }
|
||||
|
||||
evo.defer()
|
||||
for _ = 1, N do
|
||||
clone(prefab)
|
||||
end
|
||||
evo.commit()
|
||||
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Simple Clone | %d entities with 5 components', N),
|
||||
function()
|
||||
local clone = evo.clone
|
||||
@@ -54,6 +84,21 @@ basics.describe_bench(string.format('Clone Benchmarks: Simple Clone | %d entitie
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Simple Defer Clone | %d entities with 5 components', N),
|
||||
function()
|
||||
local clone = evo.clone
|
||||
|
||||
local prefab = evo.spawn { [F1] = true, [F2] = true, [F3] = true, [F4] = true, [F5] = true }
|
||||
|
||||
evo.defer()
|
||||
for _ = 1, N do
|
||||
clone(prefab)
|
||||
end
|
||||
evo.commit()
|
||||
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
print '----------------------------------------'
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Simple Clone | %d entities with 1 required component', N),
|
||||
@@ -69,6 +114,21 @@ basics.describe_bench(string.format('Clone Benchmarks: Simple Clone | %d entitie
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Simple Defer Clone | %d entities with 1 required component', N),
|
||||
function()
|
||||
local clone = evo.clone
|
||||
|
||||
local prefab = evo.spawn { [R1] = true }
|
||||
|
||||
evo.defer()
|
||||
for _ = 1, N do
|
||||
clone(prefab)
|
||||
end
|
||||
evo.commit()
|
||||
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Simple Clone | %d entities with 3 required components', N),
|
||||
function()
|
||||
local clone = evo.clone
|
||||
@@ -82,6 +142,21 @@ basics.describe_bench(string.format('Clone Benchmarks: Simple Clone | %d entitie
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Simple Defer Clone | %d entities with 3 required components', N),
|
||||
function()
|
||||
local clone = evo.clone
|
||||
|
||||
local prefab = evo.spawn { [R3] = true }
|
||||
|
||||
evo.defer()
|
||||
for _ = 1, N do
|
||||
clone(prefab)
|
||||
end
|
||||
evo.commit()
|
||||
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Simple Clone | %d entities with 5 required components', N),
|
||||
function()
|
||||
local clone = evo.clone
|
||||
@@ -95,6 +170,21 @@ basics.describe_bench(string.format('Clone Benchmarks: Simple Clone | %d entitie
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Simple Defer Clone | %d entities with 5 required components', N),
|
||||
function()
|
||||
local clone = evo.clone
|
||||
|
||||
local prefab = evo.spawn { [R5] = true }
|
||||
|
||||
evo.defer()
|
||||
for _ = 1, N do
|
||||
clone(prefab)
|
||||
end
|
||||
evo.commit()
|
||||
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
print '----------------------------------------'
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Multi Clone | %d entities with 1 component', N),
|
||||
@@ -108,6 +198,19 @@ basics.describe_bench(string.format('Clone Benchmarks: Multi Clone | %d entities
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Multi Defer Clone | %d entities with 1 component', N),
|
||||
function()
|
||||
local multi_clone = evo.multi_clone
|
||||
|
||||
local prefab = evo.spawn { [F1] = true }
|
||||
|
||||
evo.defer()
|
||||
multi_clone(N, prefab)
|
||||
evo.commit()
|
||||
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Multi Clone | %d entities with 3 components', N),
|
||||
function()
|
||||
local multi_clone = evo.multi_clone
|
||||
@@ -119,6 +222,19 @@ basics.describe_bench(string.format('Clone Benchmarks: Multi Clone | %d entities
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Multi Defer Clone | %d entities with 3 components', N),
|
||||
function()
|
||||
local multi_clone = evo.multi_clone
|
||||
|
||||
local prefab = evo.spawn { [F1] = true, [F2] = true, [F3] = true }
|
||||
|
||||
evo.defer()
|
||||
multi_clone(N, prefab)
|
||||
evo.commit()
|
||||
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Multi Clone | %d entities with 5 components', N),
|
||||
function()
|
||||
local multi_clone = evo.multi_clone
|
||||
@@ -130,6 +246,19 @@ basics.describe_bench(string.format('Clone Benchmarks: Multi Clone | %d entities
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Multi Defer Clone | %d entities with 5 components', N),
|
||||
function()
|
||||
local multi_clone = evo.multi_clone
|
||||
|
||||
local prefab = evo.spawn { [F1] = true, [F2] = true, [F3] = true, [F4] = true, [F5] = true }
|
||||
|
||||
evo.defer()
|
||||
multi_clone(N, prefab)
|
||||
evo.commit()
|
||||
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
print '----------------------------------------'
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Multi Clone | %d entities with 1 required component', N),
|
||||
@@ -143,6 +272,19 @@ basics.describe_bench(string.format('Clone Benchmarks: Multi Clone | %d entities
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Multi Defer Clone | %d entities with 1 required component', N),
|
||||
function()
|
||||
local multi_clone = evo.multi_clone
|
||||
|
||||
local prefab = evo.spawn { [R1] = true }
|
||||
|
||||
evo.defer()
|
||||
multi_clone(N, prefab)
|
||||
evo.commit()
|
||||
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Multi Clone | %d entities with 3 required components', N),
|
||||
function()
|
||||
local multi_clone = evo.multi_clone
|
||||
@@ -154,6 +296,19 @@ basics.describe_bench(string.format('Clone Benchmarks: Multi Clone | %d entities
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Multi Defer Clone | %d entities with 3 required components', N),
|
||||
function()
|
||||
local multi_clone = evo.multi_clone
|
||||
|
||||
local prefab = evo.spawn { [R3] = true }
|
||||
|
||||
evo.defer()
|
||||
multi_clone(N, prefab)
|
||||
evo.commit()
|
||||
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Multi Clone | %d entities with 5 required components', N),
|
||||
function()
|
||||
local multi_clone = evo.multi_clone
|
||||
@@ -164,3 +319,16 @@ basics.describe_bench(string.format('Clone Benchmarks: Multi Clone | %d entities
|
||||
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
basics.describe_bench(string.format('Clone Benchmarks: Multi Defer Clone | %d entities with 5 required components', N),
|
||||
function()
|
||||
local multi_clone = evo.multi_clone
|
||||
|
||||
local prefab = evo.spawn { [R5] = true }
|
||||
|
||||
evo.defer()
|
||||
multi_clone(N, prefab)
|
||||
evo.commit()
|
||||
|
||||
evo.batch_destroy(Q1)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user