4 ms·
While you are right, the compiler should still definitely do most of the job. There's simply no reason to keep track of dependencies, etc. at run-time, instead
by Laaas 9y ago
While you are right, the compiler should still definitely do most of the job.
There's simply no reason to keep track of dependencies, etc. at run-time, instead of doing this compile-time.
- striking 9y agoSome of that information doesn't exist at compile time...
- jonhohle 9y agoDo you have any examples of when this beats a C program compiles with `-march -O2`? I've read about this promise of JIT optimization being able to generate optimal code on hot paths, but in practice I've never seen it work out that way. Good AOT compilers exist today and consistently generate optimized machine code.
- ksk 9y agoYour C code is already executed by the CPU in a JIT optimized way because of the way the x86 architecture is implemented on the CPU. What more proof do you want?! :)
- Laaas 9y agoI don't exactly know what you're searching for, but I've heard of LuaJIT beating GCC, etc. in some rare cases.
- jonhohle 9y agoI'm honestly searching for examples of a JIT beating an AOT because it had runtime information the AOT couldn't know.
- Laaas 9y agoHow so? When the compiler generates code like add eax, eax add ebx, ebx Of course it knows that they are independent. They could then be represented in the ISA as a block of sorts.