Skip to content

Instantly share code, notes, and snippets.

View catid's full-sized avatar

Chris Taylor catid

View GitHub Profile
PLR FEC PPS ELossMin ELossAvg ELossMax
0.01 0.05 333 0.9976 0.999607 1
0.01 0.07 333 0.9985 0.999913 1
0.01 0.06 333 0.998199 0.999829 1
0.01 0.02 333 0.990996 0.994607 0.997599
0.01 0.18 333 0.9994 0.999994 1
0.01 0.12 333 0.9997 0.999997 1
0.01 0.08 333 0.9985 0.999943 1
0.01 0.19 333 1 1 1
0.01 0.04 333 0.9952 0.998767 1
PLR FEC PPS ELossMin ELossAvg ELossMax
0.01 0.05 333 0.9976 0.999607 1
0.01 0.07 333 0.9985 0.999913 1
0.01 0.06 333 0.998199 0.999829 1
0.01 0.02 333 0.990996 0.994607 0.997599
0.01 0.18 333 0.9994 0.999994 1
0.01 0.12 333 0.9997 0.999997 1
0.01 0.08 333 0.9985 0.999943 1
0.01 0.19 333 1 1 1
0.01 0.04 333 0.9952 0.998767 1
Bitslice(7) 2122196 us; cnt = 15730702
Bitslice(24) 1957533 us; cnt = 15730702
Lauradoux 878497 us; cnt = 15730702
Skipping SSE2 timings; not compiled for that architecture
Skipping SSSE3 timing; not compiled for that architecture.
16-bit LUT 1558676 us; cnt = 15730702
8-bit LUT 2762595 us; cnt = 15730702
popcount 1215033 us; cnt = 15730702
popcountll 427195 us; cnt = 15730702
FreeBSD version 1 4423153 us; cnt = 15730702
// Get the next bit to flip to produce the 8-bit Gray code at the provided index
// Precondition: index > 0 and index < 256
static int GetBitFlipForGrayCode8(int index)
{
if (index & 1)
return 0;
if (index & 15)
return (0x6764 >> (index & 14)) & 3;
// Get the next bit to flip to produce the 8-bit Gray code at the provided index
// Precondition: index > 0 and index < 256
static int GetBitFlipForGrayCode8(int index)
{
if (index & 1)
return 0;
if (index & 15)
return (0x6764 >> (index & 14)) & 3;