Hacker News new | ask | show | jobs
by asgs 3111 days ago
nice comment! how does enforcing type system help improve the performance? is there any article that sheds more light? also, did you mean static typing instead of strong?
1 comments

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.
... 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.