rhai/scripts/speed_test.rhai
2021-04-04 23:22:45 +08:00

14 lines
239 B
Plaintext

// This script runs 1 million iterations
// to test the speed of the scripting engine.
let now = timestamp();
let x = 1_000_000;
print("Ready... Go!");
while x > 0 {
x -= 1;
}
print(`Finished. Run time = ${now.elapsed} seconds.`);