← Back to context

Comment by jntun

2 days ago

They asked if it could be "as fast as the JVM", which JIT is a crucial part of how the JVM achieves its performance. JIT in this context is referring to the process of a source file (.rb, .js, .c, etc), or usually bytecode, being compiled into machine code. I cannot think of an instance where a C source file is JIT compiled and dlopen(3) will not be happy if you tried to call it on a C source file.

And yet we were just talking about the JVM, which will not be happy if you tried to call it on a Java source file. Or is WASM an AOT compiler because it runs the equivalent dlopen of C code somewhat slower than the native dlopen?

  • Bytecode is not machine code, and I specifically said source files "or usually bytecode". A C program is compiled into machine code (and more specifically a platforms given executable format) before dlopen(3) is called on it. Not sure what point you're really trying to make.