Does assigning a type for a variable improve performance?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By GDYEE

which is better for performance?

var example_one = 20
var example_two:int = 20
:bust_in_silhouette: Reply From: CassanovaWong

That is what I have been told.

:bust_in_silhouette: Reply From: Ertain

Static typing currently doesn’t increase performance. As per the documentation:

In the future, typed GDScript will also increase code performance: Just-In-Time compilation and other compiler improvements are already on the roadmap!

From the looks of it, increases in performance by way of static typing will be in version 4.0 of the engine.