| ▲ | ComputerGuru 6 hours ago | |
I guess I’m confused why an actual add instruction is emitted rather than whatever overloaded operation takes place when the + symbol (or overloaded add vtable entry) is called (like it would in other OOP languages). | ||
| ▲ | tekknolagi 5 hours ago | parent | next [-] | |
If all you're doing is summing small integers---frequently the case---it's much preferable to optimize that to be fast and then skip the very dynamic method lookup (the slower, less common case) | ||
| ▲ | zingar 4 hours ago | parent | prev [-] | |
Presumably other languages with JIT do exactly the same thing? | ||