Files
godot-benchmarks/gdscript/packed_string_array.gd
Hugo Locurcio b416f5792a Add initial GDScript tests
- Add wall clock time measurement on benchmarks.
- Allow tests to not have a predefined time limit.
  - This is required for scripting tests.
- Fix culling tests not reporting GPU time.
2021-11-29 14:43:11 +01:00

21 lines
385 B
GDScript

extends Node
const ITERATIONS = 80_000
func _ready():
var array: PackedStringArray = PackedStringArray()
for i in ITERATIONS:
# Insert elements.
array.push_back(str("Godot ", i))
for i in ITERATIONS:
# Update elements in order.
array[i] = ""
for _i in ITERATIONS:
# Delete elements from the front (non-constant complexity).
array.remove_at(0)
Manager.end_test()