Quote:
Originally Posted by G_Morgan
On any particular piece of code I will outperform the compiler on selection of operations, register allocation and operation ordering. However I cannot do this for millions of lines of C code. The compiler can crunch through millions without getting a headache. The human brain is remarkable but a limited resource. It's vitally important to apply it selectively and let automation handle the less relevant parts.
I specifically used the terms higher and lower to present a progression. C is a lower level language relative to something like Python.
Some perversities have been performed for no apparent benefit without doubt. It depends on how thin the wrappers are though. It could be done by flicking a function pointer and in that case it would be no less efficient than anything else. Something like Swing is obviously less efficient but it's purpose is portability rather than efficiency.
|
In the case of going through millions of lines of assembly code, my point is not that it is a difficult task, but that is how you would achieve the ultimate in optimization. I never claimed that it was a reasonable task.
Using any unnecessary wrapper is in my opinion just a bad idea when I can code it myself. Which is why using .NET is just ridiculous, it's basing all of your code on an ugly worthless wrapper. I will agree that there are some abstractions that can be useful, however it is my general philosophy to eliminate as much abstraction as possible.
Whenever coders lose site of efficiency I begin to dismiss their code from a usability standpoint.