2 ms·
It will definitely hurt performance (to remove JIT functionality), otherwise why would JIT compilation be even used?
by amelius 4y ago
It will definitely hurt performance (to remove JIT functionality), otherwise why would JIT compilation be even used?
- simjnd 4y agoI 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.