Skip to content

Search

Geri
· 2 dk okuma

Benchmarks

The Godot benchmark suites' physics and scene-tree cases run body for body in Balaur, the numbers beside Godot's, and the work they prompted.

examples/benchmark is the Godot benchmark suites' physics and scene-tree cases, body for body, run headless, in the editor or on the web. On the twelve physics cases Balaur is about 3× Godot Jolt and 11–18× Godot Physics.

The 3D physics cases, one bar per engine

The 2D physics cases, one bar per engine

The suite

  • The physics cases are pyramid, mixed pile, joint grid, smash, query storm and drop, in 2D and 3D: the scenes the godot-rapier suite publishes. 300 timed steps at 60 Hz after a settle, and the median tick is the number.
  • The node cases are add_children, delete_children in order, reverse and random, and get_node, against Godot's own published run.
  • scripts/bench_compare.py writes the tables and charts from a run beside Godot's results. The benchmarks page is that script's output.

What the numbers changed

  • raycast stops at the nearest hit.
  • Creating a body composes the node's pose from its ancestors.
  • A frame's queued frees run as one pass per parent. Freeing a whole container is linear.
  • Children are indexed by name: a path lookup is one hash per segment. Freeing a node with no components asks no plugin anything.

Adding children is quicker than Godot; deleting and looking up are slower. Rapier is under both Balaur and Godot Rapier, so the gap between those two columns is the engine around the physics.

balaur run examples/benchmark --headless --fixed-tick -- --case=3d/pyramid
python3 scripts/bench_compare.py --shots --godot-results <benchmarks-repo>/results