On 04/25/2016 03:21 PM, Solomon E wrote:
I'm more concerned with getting the application
logic right when I program than optimizing for speed or bytes, until
something is noticeably pausing or taking extra megabytes.

This is a luxury not available to library writers.

bool isPow2D(T)(T x)
{
     return (x > 0) && !(x & (x - 1));
}

This is worse than what we have now, which is easy to show is correct.


Andrei

Reply via email to