Why are statically-typed languages more performant?

Dynamically-typed languages need tags (metadata) to keep track of the types of their underlying data in memory.

This results in slower execution due to runtime checking:

  • tags need to be managed (i.e. initialized, read, compare and written at runtime)

Tags also occupy more memory, making it more bloated compared to statically-typed languages.