3 ms·
After about the Pentium-/Pentium Pro-era, hand-coded assembly generally is premature optimization (and wasted effort). Once upon a time(tm), you could write se
by sacnoradhq 4y ago
After about the Pentium-/Pentium Pro-era, hand-coded assembly generally is premature optimization (and wasted effort).
Once upon a time(tm), you could write self-modifying code or guess at keeping pipelines occupied by manual instruction reordering, but cache line invalidation and OOOE make these moot.
The problem is that with a pipeline stall (wrong branch predicted) in hyper-deep pipelines, the penalty is enormous: waiting for the other condition calculation to percolate through the pipeline or independent stages.
Processors are optimized for the mainstream, usually the current or last generation of compilers when the processors were designed.
To generate the generally fastest bitcode, it would require an incremental JIT with history that can permute and mutate bitcode from runtime metrics. That's beyond HotSpot(tm), LLVM, or anything of the sort.