Modern processors, and not just processors from Intel, but also AMD, ARM, IBM, etc. that are cache-coherent are not optimized at all for vtable lookups. Virtual functions/methods in many languages other including C++ are the source of huge amounts of cache misses.
Languages that run in a JITed virtual machine like C# or Java still suffer from virtual method problems when the runtime can't determine if a call site is statically bound to a particular class, particularly Java because all instance methods in Java classes are implicitly virtual.
Modern processors are also ill-suited for object-orientation in general as it results in bad memory accessing patterns that also cause more cache misses to occur than had you designed your programs using data-oriented principles.
You can still use C++ or whatever, just avoid fine-grained virtual calls and overuse of object-orientation. And for that matter, avoid Java completely.
Optimize, Optimize, Optimize... then get it working.
Name:
Anonymous2011-03-11 19:57
>>4
Depends what you're doing. If you're into high performance computing, and you're already using the most efficient known algorithms for your problems, optimizing for cache coherent hardware to reduce cache misses can further improve your program's performance by as much as two orders of a magnitude.