Hacker News new | ask | show | jobs
by jrockway 5002 days ago
node is compiled to native code at runtime, and the compiler uses runtime type information to generate that code. C (without LLVM's JIT, of course) is compiled to native code before runtime, and as such, cannot take advantage of runtime type information when producing the code. So in this case, node does have a theoretical advantage.

But to be thorough, one should also compile libmysql's parsing routines with LLVM and turn on runtime JIT compilation, and then write a benchmark that will exercise the code long enough for the JIT to kick in.

1 comments

So take the output of the profiler after running the program on a diversity of real inputs and use that to drive the optimizer.