TomsFastMath is a fast public domain, open source, large integer arithmetic library written in portable ISO C. It is a port of LibTomMath with optional support for inline assembler multipliers. It has the following features:
- Builds with GCC [preferably v3.3.x or higher] on any 32-bit/64-bit box
- Includes ASM optimizations (inline) for
- x86-32 (e.g. i386 and SSE2)
- x86-64 (e.g. AMD64)
- ARM (ARMv4 and higher)
- PPC32 (e.g. G3/G4)
- PPC64 (e.g. G5)
- AVR32 (Atmel 32-bit RISC processor)
- MIPS (32-bit)
- Includes fairly complete API (provides most of what LibTomMath provides)
- Uses similar API as LibTomMath makes porting easy
- Competitive speeds (and getting higher).
- Faster than OpenSSL on the AMD64
- Still room for improvements
- No heap usage (malloc/calloc/free)
- Uses only inline asm, simplifies build process, simple to add new ports
The library is available as 32-bit and 64-bit:
- If you are compiling a 32-bit program, no special compiler options are needed.
- If you are compiling a 64-bit program, you have to compile and link your application with "cc -q64" or "gcc -maix64".