Simple benchmark that measures function call overhead in Godot for implementations in various programming languages. Spawns 20_000 2d sprites on the screen and moves them forward each frame.
On Ryzen 5800X, Ubuntu 25.10, Compatibility Renderer, Radeon 7900 GRE with radeonsi, .NET 10 JIT, Godot 4.6, Firefox
Individual projects are in:
spritebench_cs: Godot C#spritebench_gdscript: Godot GDScriptspritebench_cpp: godot-cpp (C++)spritebench_go: graphics.gd (Go)spritebench_rust: godot-rust (Rust)spritebench_swift: SwiftGodot (Swift)spritebench_Odin: Toxin (Odin)
To run them, build the respective extension (for Go, Rust, Swift, C++, Odin) and export them in release mode.
By default, 20_000 sprites will be spawned. The app runs for 100 frames, then records the frametimes for 1_000 frames. Afterwards, a text area is shown that contains the frametimes, which can be copied and pasted to a csv file. It is implemented this way so that it is easy to extract the values when running the web build.
Note that VSync is disabled in the projects, but is enforced by most web browsers. In Firefox, you can disable it in about:config by setting layout.frame_rate=0 (restart required).