News for hackers. Stuff that matters.
Re:8-bit number to binary string by acqq on Thursday November 05, 2015 @11:47AM (#10514368)
Thanks for measuring.

From your github source:

    /* anyone have a big-endian machine at hand to test this? */
    #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
    #define MULT  0x8040201008040201ULL
    #else
    #define MULT  0x0102040810204080ULL
    #endif
Even without the machine I believe that such a big endian implementation can't work. Hint: you can try it on the little endian machine too, the resulting bits must be appropriate, and I believe they wouldn't. That's the beauty of the magic constants, their construction isn't so easy as it appears to be.
Re:8-bit number to binary string by cnvogel on Thursday November 05, 2015 @12:07PM (#10514522)
You are right, the carry bits will clobber the neighboring bytes, I think.
Re:8-bit number to binary string by acqq on Thursday November 05, 2015 @12:08PM (#10514526)
> the carry bits will clobber

Actually, not the carry bits, the "content" bits. The 8-bit content must appear on more places there for the magic to work.