News for hackers. Stuff that matters.
Re:Optimising Memset and Memcpy by WalterBright on Sunday November 28, 2021 @01:09PM (#29371221)
A good heuristic is simply minimize the number of instructions.
Re:Optimising Memset and Memcpy by mhh__ on Sunday November 28, 2021 @01:30PM (#29371453)
I doubt it'd be an issue for memcpy but minimizing the size of a loop body can lead to very counterintuitive speedups now processors have LSDs (loop stream detectors).
Re:Optimising Memset and Memcpy by jeffbee on Sunday November 28, 2021 @04:20PM (#29373157)
If you make them too small it can lead to counterintuitive slowdowns.