E.g. in ewah.h line 908 it's worth making sure compilers compute the upper bound once, and not at each iteration.
A safer alternative, immune to optimization woes, with minimal changes:
for (size_t k = 0, e = rlw.getNumberOfLiteralWords(); k < e; ++k)