3 ms·
Blink actually does run the GCC9 CC1 command from start to finish twice as fast. Qemu takes 600ms to run it and Blink takes 300ms. Both Qemu and Blink use a JIT
by jart 4y ago
Blink actually does run the GCC9 CC1 command from start to finish twice as fast. Qemu takes 600ms to run it and Blink takes 300ms. Both Qemu and Blink use a JIT approach. Since GCC CC1 is a 33mb binary, a lot of the time it takes to run it, it stresses the JIT pretty hard. https://twitter.com/JustineTunney/status/1610276286269722629 https://twitter.com/JustineTunney/status/1610276286269722629
- mhh__ 4y agoThat's partly what I meant though, how fast is it at a longer running process? C doesn't require all that much semantic analysis so there usually isn't all that much hot code in the compiler, so it would suit a simple-fast JIT whereas QEMU does do some basic optimizations. I've only ever really skimmed the TCG source code but it wouldn't surprise me if a new-er JIT could smack it's arse given that with these old C codebases (it's probably one of Bellard's few flaws) it's pretty hard to actually make true architectural changes. The Java/script (I think more Javascript but I'm hedging my bets by including jvms too) JITs are probably the cutting edge but I'd imagine still quite beatable for a few cases.
- bonzini 4y agoRosetta is closer to QEMU than to v8 or Hotspot. Granted, it benefits from an insanely large out of order execution engine, but it shows that there's only so much you need to optimize when translating assembly code.