> Dolphin isn’t on iOS, because you can’t do JIT compilation on iOS....Well, Apple has one exception to its JIT restrictions: web browsers. JavaScriptCore, WebKit’s JS engine, uses JIT compilation for its higher-performance tiers. So, if a JS function is called enough times, eventually it’ll be optimised and compiled into native machine code. The same is true for WebAssembly.
I was wondering about the why of the headline, and this is a really interesting answer. Such a beautiful way to get around restrictions. I wonder how applicable it is to other projects.
I've always really enjoyed Andrew Kelley's article about trying to statically recompile NES code from 2013 [1]. Basically he makes a ton of progress but gets hung up not just on the realities of the handwritten assembler of the era just not being all that great at mapping to higher level LLVM IR. In the conclusion he specifically calls out a JIT-type methodology as probably being the way to go, where you live-recompile the hot paths when you have the runtime data required to actually understand them, and don't worry about the parts you can't.
True, but the WASM JIT is pretty low overhead because WASM seems to be a good design for what it needs to do. It's what I was referring to with the 20% overhead figure.
I would not expect the average undergraduate to understand the intricacies of how iOS does dynamic codesigning enforcement. There are plenty of people who have graduated with advanced degrees and work at Apple who don't really understand how it works, either.
> Dolphin isn’t on iOS, because you can’t do JIT compilation on iOS....Well, Apple has one exception to its JIT restrictions: web browsers. JavaScriptCore, WebKit’s JS engine, uses JIT compilation for its higher-performance tiers. So, if a JS function is called enough times, eventually it’ll be optimised and compiled into native machine code. The same is true for WebAssembly.
I was wondering about the why of the headline, and this is a really interesting answer. Such a beautiful way to get around restrictions. I wonder how applicable it is to other projects.
I've always really enjoyed Andrew Kelley's article about trying to statically recompile NES code from 2013 [1]. Basically he makes a ton of progress but gets hung up not just on the realities of the handwritten assembler of the era just not being all that great at mapping to higher level LLVM IR. In the conclusion he specifically calls out a JIT-type methodology as probably being the way to go, where you live-recompile the hot paths when you have the runtime data required to actually understand them, and don't worry about the parts you can't.
Very cool to see something like that in action.
[1]: https://andrewkelley.me/post/jamulator.html
This is an incredible project for an undergraduate. Very impressive. Interesting to note that Firefox is 25% slower than Chrome/Safari, I wonder why.
Of course it beats a native interpreter. WASM overhead is about 20%, interpreter overhead is about 1000%.
What's cool here is to have a GameBoy JIT runtime at all.
It's two jits in total.
True, but the WASM JIT is pretty low overhead because WASM seems to be a good design for what it needs to do. It's what I was referring to with the 20% overhead figure.
Very interesting article. Would've been fun to see the comparison between native interpreter & JIT-on-WASM on iOS as well
The author's base assumption, and stated motivation for doing this project, is wrong.
https://github.com/StephenDev0/StikDebug
For an undergrad project, I suppose it's fine to conveniently forget about the existence of this solution for the sake of getting a good grade.
I would not expect the average undergraduate to understand the intricacies of how iOS does dynamic codesigning enforcement. There are plenty of people who have graduated with advanced degrees and work at Apple who don't really understand how it works, either.
It’s wrong ‘for sideloaded apps that have the get-task-allow entitlement.’
It’s right for ‘regular’ apps.
So it's a JIT-in-JIT? JiJIT?
Still doesn't beat a natively-coded emulator. I got several that run faster on a 166MHz non-MMX Pentium than this emulator does on my Core Ultra i9.
yet on real old hardware it would be 20x slower in real life. same as all native javascript junk - its fast, but non usuable on older hardware
Here's a nickel kid. Go buy yourself a real computer.
How much RAM would a nickel buy me?
based on the tracked average of $12.65/gb from rampricesusa you could get about 4mb of ddr5
Good thing I'm not running games on my 4gb Pentium 4 then.
Your code running on other people’s hardware is a privilege. Treat it with respect.
You can also like not run the Gameboy emulator