4 ms·
I may be wrong, but I think it goes something like this: Languages that benefit from JIT compilation are languages with a dynamic type system: the JIT profiles
by simjnd 4y ago
I may be wrong, but I think it goes something like this:
Languages that benefit from JIT compilation are languages with a dynamic type system: the JIT profiles the hot paths to optimize (e.g. this function is called a lot with integer parameters but only once with string parameters, so I'm going to compile the version with ints to optimal code and compile the string version to a suboptimal but inexpensive code)
Go on the other hand has a static type system, so when you AOT compile it can already produce all the optimal code needed thanks to static types.
- amelius 4y agoYes, this was already noted a few comments above: https://news.ycombinator.com/item?id=33394615 https://news.ycombinator.com/item?id=33394615 Type information is not the only thing that helps though. Partial specialization can be applied to other things.