Remix.run Logo
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.

manwe150 2 days ago | parent [-]

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?

jntun 2 days ago | parent [-]

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.

manwe150 a day ago | parent [-]

I’m saying your definition isn’t logical since there are counter examples to those claims. For one thing, Java byte code is a machine code (https://en.m.wikipedia.org/wiki/Java_processor Jazelle). These things differ in degrees of quality (along various axes) more than in their definitions.