> But in your test branch, are you still computing the inversion even in the case where you aren't using the Gray-code method at all? sarang: Ah, good catch! I am computing the inversions even in the case with Gray codes disabled. This is unfair to that case. I updated the code and reran the test, and while this did help the non-Gray-code case, the different was negligible and Gray codes still offer a ~60% performance improvement in this configuration: https://github.com/cargodog/one-of-many-proofs/issues/19#issuecomment-696943666