Content deleted Content added
This section is redundant, removing it. |
Note minor optimization for GF(2) BCH code. |
||
Line 135:
}
return L;
</syntaxhighlight>
In the case of binary GF(2) BCH code, the discrepancy d will be zero on all odd steps, so a check can be added to avoid calculating it.
<syntaxhighlight lang=C>
/* ... */
for (n = 0; n < N; n++) {
/* if odd step number, discrepancy == 0, no need to calculate it */
if ((n&1) != 0) {
m = m + 1;
continue;
}
/* ... */
</syntaxhighlight>
|