3 ms·
Statically typed languages typically have better performance. In C, i++ is one or two machine instuctions. In javascript, we don’t know if i is an int, or som
by hedora 6y ago
Statically typed languages typically have better performance.
In C, i++ is one or two machine instuctions. In javascript, we don’t know if i is an int, or something that overrode ++ to download wikipedia. So, it ends up being a function call in naive JavaScript. Fast forward a decade, and dozens of PhD theses mean that ++ is usually a machine instruction in JavaScript, but it is not guaranteed.
- deleted 6y ago[deleted]