3 ms·
Performance isn't one dimensional. Maybe the benchmarks you're looking at aren't gated on method call performance. Maybe the authors of whatever benchmark you'r
by pcwalton 11y ago
Performance isn't one dimensional. Maybe the benchmarks you're looking at aren't gated on method call performance. Maybe the authors of whatever benchmark you're looking at wrote final manually. Maybe they used freestanding functions instead of methods. Maybe your benchmarks aren't calling functions at all. Who knows?
The point is that anyone who has worked on compilers for OO languages will tell you the same thing about devirtualization. This stuff goes back to Smalltalk implementations in the 80s.
- mpweiher 11y ago> Maybe the benchmarks you're looking at aren't gated on method call performance. Most real world programs aren't gated on method call performance. And things have changed since the 80ies. Heck, even in the 90ies, Squeak Smalltalk was plenty fast for media work using a plain byte-code interpreter (no JIT), because the heavy lifting was done in primitives. Just like Tcl was used in supercomputing.