Created
February 19, 2022 13:04
-
-
Save andrew-wilkes/e05282f041606ef6a8728779dc34fb0e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends SceneTree | |
var t = [] | |
func _init(): | |
for j in 5: | |
var k = [] | |
var p_time = OS.get_ticks_msec() | |
for i in 10_000_000: | |
k.append(i) | |
prints('Test took:', str(OS.get_ticks_msec() - p_time, 'ms')) | |
t.append(OS.get_ticks_msec() - p_time) | |
var s = 0 | |
for i in t: | |
s = s + i | |
prints('Average time =', str(s / t.size(), "ms")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment