GDscript vs C++ -- which one is faster?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By RODGIMA
:warning: Old Version Published before Godot 3 was released.

Im one of those that is seeking for performance over all, in a numerical comparision of 1 (slow) to 10 (fast), what amount does GDscript get over c++ on the release?

I could use GDscript for some game big requirements, but in my case, it is like cube2…

Comparing script language and a compiled static type language is unfair… The later one is almost always faster than the previous one.

jikai507 | 2021-10-04 18:02

:bust_in_silhouette: Reply From: Zylann

If you are seeking for performance above all, C++ is the way to go.

GDScript is ~100 times slower than C++, so you should only use it for very high level stuff, like “do this when walking in this area”, or “Spawn enemy here every X seconds”.

The best tradeoff is to find what requires the most CPU, implement it in C++ and expose high level functions to GDScript/Nodes/Resources, so you can achieve great level of tweak with good performance.

Thanks is good to know it.

RODGIMA | 2016-05-11 16:47