Change from for loop to Hardcode
All checks were successful
Deploy datapack to dev / Build (push) Successful in 7s
All checks were successful
Deploy datapack to dev / Build (push) Successful in 7s
This commit is contained in:
parent
5e44a9eb28
commit
490c3a9032
@ -26,10 +26,14 @@ class database {
|
|||||||
class database.benchmark {
|
class database.benchmark {
|
||||||
function arrayTest1.setup() {
|
function arrayTest1.setup() {
|
||||||
::database.test.arrayTest1.array = [];
|
::database.test.arrayTest1.array = [];
|
||||||
for ($i=0;$i<=500;$i++) {
|
Hardcode.repeat(
|
||||||
::database.test.arrayTest1.array << {id: "n", string: "array item &<$i>"};
|
indexString="[index]",
|
||||||
logger(1, database.benchmark.arrayTest1.setup, "Loop ran");
|
start=0,
|
||||||
|
stop=500,
|
||||||
|
function=() => {
|
||||||
|
::database.test.arrayTest1.array << {id: Hardcode.calc([index]+1), string: "entryHardcode.calc([index]+1)"};
|
||||||
}
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
function arrayTest1.print() {
|
function arrayTest1.print() {
|
||||||
tellraw @a {"nbt":"database.test.arrayTest1.array","storage":"ferdinland:ferdinland"};
|
tellraw @a {"nbt":"database.test.arrayTest1.array","storage":"ferdinland:ferdinland"};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user