๐Ÿ“ฆ cart / godot3-bunnymark

Compares Godot 3.1 scripting languages by rendering as many bunny sprites as possible at 60fps

โ˜… 189 stars โ‘‚ 19 forks ๐Ÿ‘ 189 watching โš–๏ธ MIT License
๐Ÿ“ฅ Clone https://github.com/cart/godot3-bunnymark.git
HTTPS git clone https://github.com/cart/godot3-bunnymark.git
SSH git clone git@github.com:cart/godot3-bunnymark.git
CLI gh repo clone cart/godot3-bunnymark
๐Ÿ“‚ 2106147ee26923f26ee2db4b1cfef1a39f39a0d5 View all commits โ†’
๐Ÿ“ benchmarks
๐Ÿ“ images
๐Ÿ“ Properties
๐Ÿ“ run_data
๐Ÿ“ runs
๐Ÿ“„ .gitignore
๐Ÿ“„ Benchmarker.gd
๐Ÿ“„ Benchmarker.tscn
๐Ÿ“„ Bunnymark.cpp
๐Ÿ“„ Bunnymark.csproj
๐Ÿ“„ Bunnymark.sln
๐Ÿ“„ default_env.tres
๐Ÿ“„ dub.json
๐Ÿ“„ export_presets.cfg
๐Ÿ“„ icon.png
๐Ÿ“„ icon.png.import
๐Ÿ“„ LibCPP.tres
๐Ÿ“„ LibD.tres
๐Ÿ“„ LibNIM.tres
๐Ÿ“„ LICENSE
๐Ÿ“„ Makefile
๐Ÿ“„ nakefile
๐Ÿ“„ nakefile.nim
๐Ÿ“„ nakefile.nim.cfg
๐Ÿ“„ project.godot
๐Ÿ“„ README.md
๐Ÿ“„ run_benchmarks.sh
๐Ÿ“„ Test.tscn
๐Ÿ“„ 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

It is important to note that C#/Mono and GDNative are both very young. Its possible that their performance characteristics will change. Additionally, these are just a few benchmarks testing a few use cases. Please don't use them 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.

Running

  • Build C++ files
  • 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 * Setup headers and bindings using [these directions](https://pragmagic.github.io/godot-nim/master/index.html) * run `nake build%%CODEBLOCK0%%sh run_benchmarks.sh%%CODEBLOCK1%%USER_HOME_DIRECTORY/.godot/app_userdata/Bunnymark/benchmark_results.json%%CODEBLOCK2%%scons p=x11 target=release_debug tools=yes builtin_openssl=yes module_mono_enabled=yes -j4 -use_lto=yes``
  • Godot Commit: 619e4eb23df037d152bf7776c5447d46293aadff

Remarks

  • The tests have changed since the first run so we shouldn't make direct comparisons to those numbers
  • This is the first test with Nim implementations. It is only a bit slower than the c++ tests but its much easier to use. Very promising!
  • The tests are now fully automated. No more mindless clicking!
  • The test harness is currently written in GDScript. It does things like test loading, measuring, adding/removing bunnies, etc. This probably results in a marginal performance hit, but it should be consistent across all languages so I think thats fairer (and less work) than implementing it in each language.
  • This run was the first to use the appropriate optimizations for each test. Godot was built in release with link time optimization, no tools (except mono, which needs it afaik), mono was built without debug symbols and with optimizations, nim used -d:release and --opt:speed, c++ used -O3

Credits

  • GDScript example adapted from: https://github.com/curly-brace/godot-bunnies. Thanks @curly-brace!
  • @Capital-EX provided the initial Nim tests, the D tests, and the display server tests