Comment by orangeboats

21 days ago

You don't seem to know where the machine code are generated from. A big part of a compiler is optimizing intermediate representations of the source code.

I am not going to waste my time with you.

I’m not sure what you hope to prove by bringing up ir. I am quite familiar with it, but I don’t see how it’s relevant. Chrome v8 will have inline assembly routines for specific architectures for various fast paths as is pretty much standard in most high performance code. Compilers are not as good as hand tuned assembly especially when SIMD is involved. Just as a basic example strlen or memcpy in a libc implementation work this way on most targets.

As for ir in the Jit compiler, that is an implementation detail as far as I’m concerned, because the V8 guys had to write the bit that goes from IR to target machine instructions. My point there is that compiler authors need to understand assembly, which is just as true with IR as not. IR is just more convenient for implementing optimizer passes that may be common across architectures (ie where the abstractions hold)