Most people seem to agree gdscript should be faster for heavy engine work, but that’s not what I found.

  • aburrito@sh.itjust.works
    link
    fedilink
    arrow-up
    18
    ·
    2 months ago

    Follow up from the gdscript docs for my own reference:

    Which programming language is fastest?

    In most games, the scripting language itself is not the cause of performance problems. Instead, performance is slowed by inefficient algorithms (which are slow in all languages), by GPU performance, or by the common C++ engine code like physics or navigation. All languages supported by Godot are fast enough for general-purpose scripting. You should choose a language based on other factors, like ease-of-use, familiarity, platform support, or language features.

    In general, the performance of C# and GDScript is within the same order of magnitude, and C++ is faster than both.

    Comparing GDScript performance to C# is tricky, since C# can be faster in some specific cases. The C# language itself tends to be faster than GDScript, which means that C# can be faster in situations with few calls to Godot engine code. However, C# can be slower than GDScript when making many Godot API calls, due to the cost of marshalling. C#'s performance can also be brought down by garbage collection which occurs at random and unpredictable moments. This can result in stuttering issues in complex projects, and is not exclusive to Godot.