3 ms·
Did you miss the part about inlined calls? I was saying that if it weren't for these issues we could have them turn into a single instruction without worrying a
by the8472 3y ago
Did you miss the part about inlined calls? I was saying that if it weren't for these issues we could have them turn into a single instruction without worrying about perf.
- gpderetta 3y agoI theory the compiler could always statically inline a memcpy to a (possibly nop-padded) rep mov. Then the dynamic linker could dynamically patch the instructions to a call to an out of line function if rep mov is known not to be optimal to the actual CPU the code is running. The reverse (patching a call to memmove with a rep mov) is also possible.
- saagarjha 3y agoGenerally the compiler will not inline a memcpy if it doesn't know the size it is dealing with.