• WhatWouldKarlDo@lemmygrad.ml
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    15 hours ago

    I’m not watching a 20 minute YouTube video. But I did a quick search, and I’m guessing it’s about Box64, which does static recompilation. I’m still going to say that it’s not going to be perfect or even good enough in many cases (and their website indicates as much). You can’t always directly translate what happens on one CPU to another. Neon/SSE for example. You can do some translation, but some things will need emulating in software, and that’s going to be slow. Even memory access is different. I’m sure any programmer who’s tried writing a lockless queue is going to know that what works on x86 probably doesn’t work on ARM without a lot of futzing with memory barriers and atomic flags. It’s hard. And it’s hard because in order to be fast, it has to be the right code for the job. If you just slap a memory barrier after every instruction, it’ll run correctly, but too slow to matter.

    This is why emulators exist, and continue to exist.