this post was submitted on 02 May 2025
127 points (97.7% liked)

Linux

11649 readers
719 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Mihies@programming.dev 2 points 9 months ago (2 children)

To me it sounds like what Java or .NET JIT does. I doubt it falls strictly into emulation 🤷‍♂️

[–] teawrecks@sopuli.xyz 2 points 9 months ago

Yes, JIT is used for both, but we don't call JITing of Java/.Net bytecode "emulation" because there is no hardware that natively runs bytecode that we are emulating. Unlike x86_64 asm, bytecode is designed to be JITed. But yes, JITing is the defacto strategy for efficiently emulating one piece of hardware on another.

[–] LeFantome@programming.dev 1 points 9 months ago* (last edited 9 months ago)

In Java or .NET, the JIT is still going from a higher level abstraction to a lower one. You JIT from CIL (common intermediate language) or Java Bytecode down to native machine code.

When you convert from a high level language to a low level language, we call it compiling.

Here, you are translating the native machine code of one architecture to the native machine code of another (x86-64 to RISC-V).

When you run code designed for one platform on another platform, we call it emulation.

JIT means Just-in-Time which just means it happens when you “execute” the code instead of Ahead-of-Time.

In .NET, you have a JIT compiler. Here, you have a JIT emulator.

A JIT is faster than an interpreter. Modern web browsers JIT JavaScript to make it faster.