On Being Sufficiently Smart
prog21.dadgum.com
prog21.dadgum.com
Extrapolating, I posit that high-level languages will one day be faster than C, because of the additional implementation freedom they afford.
Consider maps. In C, there is no built-in map. I have to write one myself. So I choose an algorithm (a hash-table, say) and implement it. The compiler is then forced to do exactly what I asked for... But then, I wonder: would a binary tree be faster?
Write, profile, debug, iterate ... Most of the time, that isn't done. Performance suffers.
Now consider maps in Python. When I write d = {2:1, 3:3}, what algorithm does Python choose? It may use any data structure it wants. And indeed, it already has some heuristics to efficiently handle the most common usage patterns. Conceivably, it could silently try many different data-structures, profile the result, and choose the best one, JIT-style.
Python will one day be faster than "all but the most carefully-crafted C code".
[1] But to be honest, I don't know how true that is.