Hi Noah, On 12/26/22 03:43, Noah Goldstein wrote: > I see. The code you commented earlier was NULL for both. I don't remember; maybe there was a typo... > > Either way you can just make it: > > ``` > if((dst - 1UL) >= (end - 1UL)) { I didn't expect that would be significantly better than `(dst == end || dst == NULL)`. However, I compiled both just to see, and the assembly output for your code is shorter. I'll benchmark both to see if there are performance differences. I wonder why the compiler doesn't generate this code if it's better; it has all the information to decide that it can be transformed into that. Both clang and GCC produce better code with your suggestion (although in the case of GCC, the difference is bigger. Cheers, Alex > return dst; // either dst == NULL or dst == end. > } > ``` --