c = ((((c - 0x3f800000) >> r) + 0x3f800000) >> 23) - 127;
in production code I would be sad.
c = ((((c - 0x3f800000) >> r) + 0x3f800000) >> 23) - 127;
in production code I would be sad.
I think this story is relevant: http://www.folklore.org/StoryView.py?project=Macintosh&s...
Think of all of the time software wastes in people's lives by being bloated and inefficient.
In Java, for example, the default HashMap implementation [0] uses a while loop to compute the capacity of the array it will use as storage. Using the next highest power of two algorithm in the page listed is faster than this loop. Imagine if every JVM was microseconds faster every time a HashMap was allocated or resized. On one server, computer, or phone it's meaningless. On hundreds of millions of phones phones, PCs, and servers that adds up to meaningful amounts of time and energy.
[0] http://www.docjar.com/html/api/java/util/HashMap.java.html