Bigint (bigbit) library

Łukasz Lew picture Łukasz Lew · Jun 28, 2009 · Viewed 8.7k times · Source

I'm looking for a c++ class/library that provides 1024 bit and bigger integers and bit operations like: - bit shifting, - bitwise OR/AND, - position first zero bit

speed is crucial, so it would have to be implemented with some SIMD assembly.

Answer

SPWorley picture SPWorley · Jun 28, 2009

There are several, including GMP, but for speed, the best is likely TTmath. TTmath's design decision to use templated fixed lengths at compiletime lets it be quite fast.