| Yeah, well please tell me how? The JavaScript engine is written in C so how could the language running on top of it be faster? I will tell you how it can be - if the JavaScript engine JITs the JS in a more optimized way than the C compiler compiled the C. Well how does that make JS faster than C when JS will always carry more overhead? It cannot and does not - all it means is that the compiler was far better. A poor C compiler may be outperformed by the best JS one, but that is about the only scenario where JS will outperform C. |
If you want to keep arguing that every other language merely asymptotically approaches the performance of x86_64 assembly, that is a fine (if dumb) position. But the argument that C has a monopoly on assembly code generation is silly, as is the argument that C compilers are inherently better at code generation than all other compilers. Look at the LuaJIT2 direct-threading post upthread for an infamous example of a performant dispatching structure that isn't easily expressible in ANSI C.