15 Jul
2013
15 Jul
'13
2:20 p.m.
On Fri, Jul 12, 2013 at 4:32 AM, Ashley Whetter <awhetter.2011@my.bristol.ac.uk> wrote:
It makes a tiny tiny difference which I don't know if we care about, but wouldn't comparing the pointer to NULL add an extra instruction (or so) for the comparison and then do the bitwise or. Whereas the cast will just bitwise or with the pointer directly.
1. Don't try to outsmart a compiler. 2. Don't make my brain hurt. Cleaner and more readable code is desired in 99.9% of cases. One extra instruction for a modern processor happens in the time light moves 11 cm. We don't care about that. -Dan