Good read. But a word of caution - the "JIT vs interpreter" comparisons often favor the interpreter when the JIT is inplemented as more-or-less simple inlining of the interpreter code. (Here called "copy-and-patch" but a decades-only approach). I've had fairly senior engineers try to convince me that this is true even for Java VMs. It's not in general, at least not with the right kind of JIT compiler design.
Yeah, I expect the real advantage of a JIT is that you can perform proper register allocation and avoid a lot of stack and/or virtual register manipulation. I wrote a toy copy-patch JIT before and I don't remember being impressed with the performance, even compared to a naive dispatch loop, even on my ~11 year old processor.
JIT: So you want to be faster than an interpreter on modern CPUs
21–30 of 66 posts
Re: JIT: So you want to be faster than an interpreter on modern CPUs
#22A shame operating systems like iOS/iPadOS do not allow JIT. iPad Pro's have such fast CPU's that you cant even use fully because of decisions like this.
Re: JIT: So you want to be faster than an interpreter on modern CPUs
#23Re: JIT: So you want to be faster than an interpreter on modern CPUs
#24The issues with branch prediction aren't really as much of a thing in modern interpreters, I can really recommend reading https://inria.hal.science/hal-01100647/document
Re: JIT: So you want to be faster than an interpreter on modern CPUs
#25A shame operating systems like iOS/iPadOS do not allow JIT. iPad Pro's have such fast CPU's that you cant even use fully because of decisions like this.
What advantage does JIT compilation have over Swift or Obj-C?
Re: JIT: So you want to be faster than an interpreter on modern CPUs
#26A shame operating systems like iOS/iPadOS do not allow JIT. iPad Pro's have such fast CPU's that you cant even use fully because of decisions like this.
> that you cant even use fully because of decisions like this. Have no clue what this means - you can pre-compile for target platforms and therefore "fully" use whichever Apple device CPU.
Re: JIT: So you want to be faster than an interpreter on modern CPUs
#27A shame operating systems like iOS/iPadOS do not allow JIT. iPad Pro's have such fast CPU's that you cant even use fully because of decisions like this.
> that you cant even use fully because of decisions like this. Have no clue what this means - you can pre-compile for target platforms and therefore "fully" use whichever Apple device CPU.
Re: JIT: So you want to be faster than an interpreter on modern CPUs
#28A shame operating systems like iOS/iPadOS do not allow JIT. iPad Pro's have such fast CPU's that you cant even use fully because of decisions like this.
Re: JIT: So you want to be faster than an interpreter on modern CPUs
#29Earlier quoted context omitted.
> that you cant even use fully because of decisions like this. Have no clue what this means - you can pre-compile for target platforms and therefore "fully" use whichever Apple device CPU.
You can't precompile your web page's Javascript for iOS, even if you're willing to have it signed and notarized and submitted for policy review.
Re: JIT: So you want to be faster than an interpreter on modern CPUs
#30Earlier quoted context omitted.
What advantage does JIT compilation have over Swift or Obj-C?
JIT compilation can be faster for compiled languages too, as it allows data driven inlining and devirtualization, as well as "effective constant" propogation and runtime architecture feature detection