Skip to content

Commit

Permalink
Update benchmarks (#55)
Browse files Browse the repository at this point in the history
* Update bench.project.json for luau files

* Stress test insertion
  • Loading branch information
Ukendio authored Jun 24, 2024
1 parent 6a507d3 commit c95bc2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 26 deletions.
2 changes: 1 addition & 1 deletion bench.project.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"$path": "lib"
},
"rgb": {
"$path": "rgb.lua"
"$path": "rgb.luau"
},
"benches": {
"$path": "benches"
Expand Down
30 changes: 5 additions & 25 deletions benches/visual/insertion.bench.luau
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ return {

Functions = {
Matter = function()
for i = 1, 500 do
newWorld:spawn(
local e = newWorld:spawn()
for i = 1, 5000 do
newWorld:insert(e,
A1({ value = true }),
A2({ value = true }),
A3({ value = true }),
Expand All @@ -71,7 +72,7 @@ return {

ECR = function()
local e = registry2.create()
for i = 1, 500 do
for i = 1, 5000 do
registry2:set(e, B1, {value = false})
registry2:set(e, B2, {value = false})
registry2:set(e, B3, {value = false})
Expand All @@ -85,11 +86,8 @@ return {


Jecs = function()

local e = ecs:entity()

for i = 1, 500 do

for i = 1, 5000 do
ecs:set(e, C1, {value = false})
ecs:set(e, C2, {value = false})
ecs:set(e, C3, {value = false})
Expand All @@ -101,23 +99,5 @@ return {

end
end,
Mirror = function()

local e = ecs:entity()

for i = 1, 500 do

mcs:set(e, E1, {value = false})
mcs:set(e, E2, {value = false})
mcs:set(e, E3, {value = false})
mcs:set(e, E4, {value = false})
mcs:set(e, E5, {value = false})
mcs:set(e, E6, {value = false})
mcs:set(e, E7, {value = false})
mcs:set(e, E8, {value = false})

end
end

},
}

0 comments on commit c95bc2a

Please sign in to comment.