Re:How Rust 1.26 more than tripled the speed of my code
by jsd1982 on Monday May 14, 2018 @10:17AM
(#17065714)
Are you sure those are missed optimization opportunities where llvm copied values to registers as temporary storage instead of a direct copy to the destination register? I saw use of the temporary registers below the lines in question. Perhaps it was just a cheap copy of the value to a register which will be used later because the original destination register was clobbered.
Also I would hazard a guess that pushing flag state into a register is a lot faster than the stack.
Finally, it'd be interesting to see the original hand-rolled inline assembly used with "r" instead of "m" to see how llvm stacks up against the intended version without the redundant memory load/stores.
Also I would hazard a guess that pushing flag state into a register is a lot faster than the stack.
Finally, it'd be interesting to see the original hand-rolled inline assembly used with "r" instead of "m" to see how llvm stacks up against the intended version without the redundant memory load/stores.