Compares Godot 3.0 scripting languages by rendering as many bunny sprites as possible at 60fps
Switch branches/tags
Nothing to show
Clone or download
Latest commit 5092f74 Feb 22, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Properties Add bunnymark project and first run results Oct 23, 2017
benchmarks uncomment and use the new GodotNativeLibrary in package.d Feb 22, 2018
images uncomment and use the new GodotNativeLibrary in package.d Feb 22, 2018
run_data Bunnymark Run 2018-02-21 Feb 22, 2018
runs Bunnymark Run 2018-02-21 Feb 22, 2018
.gitignore Update GDNative-based implementations Feb 18, 2018
Benchmarker.gd Update GDNative-based implementations Feb 18, 2018
Benchmarker.tscn Tests are now fully automated. Added a BunnymarkV2 test Oct 30, 2017
Bunnymark.cpp Update GDNative-based implementations Feb 18, 2018
Bunnymark.csproj Tests are now fully automated. Added a BunnymarkV2 test Oct 30, 2017
Bunnymark.sln Add bunnymark project and first run results Oct 23, 2017
LICENSE Initial commit Oct 23, 2017
LibCPP.gdnlib Update GDNative-based implementations Feb 18, 2018
LibD.gdnlib Update GDNative-based implementations Feb 18, 2018
LibNIM.gdnlib Update GDNative-based implementations Feb 18, 2018
Makefile Update GDNative-based implementations Feb 18, 2018
README.md Update disclaimer Feb 23, 2018
Test.tscn Add D (-dlang) to Bunnymark Oct 31, 2017
default_env.tres Add bunnymark project and first run results Oct 23, 2017
dub.json Add D (-dlang) to Bunnymark Oct 31, 2017
dub.selections.json Add D (-dlang) to Bunnymark Oct 31, 2017
export_presets.cfg Add bunnymark project and first run results Oct 23, 2017
icon.png Tests are now fully automated. Added a BunnymarkV2 test Oct 30, 2017
icon.png.import Update GDNative-based implementations Feb 18, 2018
nakefile Update GDNative-based implementations Feb 18, 2018
nakefile.nim Tests are now fully automated. Added a BunnymarkV2 test Oct 30, 2017
nakefile.nim.cfg Tests are now fully automated. Added a BunnymarkV2 test Oct 30, 2017
project.godot Tests are now fully automated. Added a BunnymarkV2 test Oct 30, 2017
run_benchmarks.sh better command line args Oct 31, 2017

README.md

Godot Bunnymark

Renders an increasing number of bunny sprites until a stable 60fps is hit. This is a decent test of real world usage as it combines Godot api usage with raw computation. I plan to update this README whenever significant performance changes occur or when new languages are added. Feel free to contribute language implementations or improvements!

Disclaimer

The performance differences here might appear significant, but these benchmarks test the limits of each language (and the engine), which most games will never hit. Do not pick a language because it is "fastest" unless you know you need the fastest language. The smarter choice would be to pick the language you are most productive in. I personally think that most people will be more productive in GDScript or C#. A lot of time and energy went into making GDScript an integrated, seamless experience so it is a good starting point if you don't have a preference for any of the other languages listed.

It is also important to note that C#/Mono and GDNative are both very young. Its possible that their performance characteristics will change. And please don't use these benchmarks to say "Language X is better / faster than Language Y", we don't have enough data to make those assertions. If anything this proves that any of the choices below are viable. Choose the language that you are comfortable with and do your own testing to cover your own scenarios.

Updates

Follow me on twitter @cart_cart if you want Bunnymark updates or updates on my other projects!

Running

  • Build C++ files
    • Setup headers and bindings using these directions
    • run make in the root of this project
  • Build C# files
    • run msbuild /p:Configuration=Tools;DebugSymbols=false;Optimize=true (some terminals might require escaping some of those symbols)
  • Build Nim files
  • Build D files
  • run sh run_benchmarks.sh
  • wait! This will take some time ... the automation code is still a bit naive so it takes awhile to converge on 60 fps
  • view the results in USER_HOME_DIRECTORY/.godot/app_userdata/Bunnymark/benchmark_results.json

Benchmark Run - February 22, 2018

BunnymarkV2

Attempts to draw as many sprites as possible using Sprite nodes. It calls GetChildren() to iterate over a list of Sprites and sets their positions. It also updates a Label's text once per frame. This test aims to be a better emulation of real world api usage than the V1 tests.

Language Bunnies Rendered
GDScript (Release) 12660
C#/Mono 17236
GDNative (D) 22620
GDNative (Nim) 24315
GDNative (C++) 31738

BunnymarkV1 - DrawTexture

Attempts to draw as many sprites to the screen as possible by drawing textures directly with VisualServer. This test focuses on compute / render performance and avoids making godot api calls.

Language Bunnies Rendered
GDScript (Release) 14458
C#/Mono 51718
GDNative (Nim) 56123
GDNative (D) 58060
GDNative (C++) 60120

BunnymarkV1 - Sprites

Attempts to draw as many sprites to the screen as possible by adding Sprite nodes. This test focuses on compute / render performance and avoids making godot api calls.

Language Bunnies Rendered
GDScript (Release) 12279
C#/Mono 23279
GDNative (Nim) 30479
GDNative (D) 30636
GDNative (C++) 34174

Hardware:

  • CPU: Intel i7 7700k 4.2GHz
  • GPU: Nvidia GeForce GTX 1070
  • RAM: 16GB DDR4

Build Info:

  • OS: Arch Linux
  • Official Godot 3.0 release

Credits