Vissza
· 2 perc olvasás
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.
- Dragos Balaur
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 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_childrenin order, reverse and random, andget_node, against Godot's own published run. scripts/bench_compare.pywrites the tables and charts from a run beside Godot's results. The benchmarks page is that script's output.
What the numbers changed
raycaststops 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