[][src]Crate smallbigint

Two types, Uint and Int, like smallvec for big integers. Anything that fits in 32 bits stays on the stack. Numbers that don't fit are stored in a Box<num_bigint::BigUint> / Box<num_bigint::BigInt>.

On 64-bit architectures, by default we use unsafe to compress the types to 8 bytes, exploiting pointer alignment. This behavior is triggered by the unsafe-opt feature, which is enabled by default.

Implemented traits

Most important numeric traits have been implemented. Here are some that aren't yet; pull requests are welcome!

There aren't super many unit tests currently, but the code is sufficiently simple that there is not much space where bugs could hide.