Hacker News new | ask | show | jobs
by khedoros1 3111 days ago
Static typing means that typechecking can be done at compile-time, and optimizations can be applied then. Dynamic typing generally means that some runtime layer needs to do typechecking during execution. So, as a rule of thumb, it's usually assumed that a statically-typed language will be faster than a dynamically-typed one.
1 comments

... unless the dynamically typed language also allows type declarations, intended mainly for enhancing speed.
"Dynamic" or "static" isn't a binary value. A dynamic language that allows some static typing is less dynamic than a language that doesn't allow that.