3 ms·
Seriously with the downvotes? Dynamic languages are obviously slower than static languages in general. Some special cases aside. Performance is a concern for s
by eloff 9y ago
Seriously with the downvotes? Dynamic languages are obviously slower than static languages in general. Some special cases aside.
Performance is a concern for some projects - you wouldn't write an OS, database kernel, or mainstream game engine in a dynamic language.
How is that not a valid concern in the dynamic vs static typing argument? The parent comment has a legitimate point.
- dnautics 9y agoTechnically, this is a strong/weak type distinction. Dynamic but strongly typed languages like Julia and erlang can be quite performant when given strong fences around the types their functions are passed.
- eloff 9y agoNo. Not at all. It has more to do with implementations. Python is strongly typed, but dynamic. But slow. JavaScript and PHP are weakly typed and dynamic as they will coerce types in strange ways during operations and comparisons. Lua is dynamically and strongly typed like Python, but LuaJIT can sometimes produce code on par with or even slightly faster than native code - because it's really JIT compiling the hot path to native code with some guards and offramps to interpreted code for special/unexpected cases. But there are limits to those techniques and it's doubtful that dynamic languages will ever perform at the same level as static languages because the compiler simply has more information and doesn't have to be as pessimistic or insert as many runtime guards.
- dnautics 9y ago> it's doubtful that dynamic languages will ever perform at the same level as static language I think these timing benchmarks come after the jit warmup procedure, so the presumption is that the compilation cost is amortized over lots of runs in an HPC-type setting: https://julialang.org/#high-performance-jit-compiler https://julialang.org/#high-performance-jit-compiler