I optimized the adaptive binary predictor code in Matt's fpaqc. The code below shows both old and new.
void update(int y) {
#ifdef SLOWPRED
// original predictor
if (y) t[cxt]+=65536-t[cxt]>>5;
else t[cxt]-=t[cxt]>>5;
#else
// faster predictor (equivalent)
t[cxt] -= (t[cxt] - y >> 5) - (-y & 0x7ff);
#endif
if ((cxt+=cxt+y)>=512) cxt=1;
}