# LibBF Benchmark

## Multiplication speed

### Test parameters

- CPU: Intel Core i5-4570 @ 3.2 GHz
- RAM: 8 GB
- OS: Linux, Fedora 28 x86_64
- GCC version 8.3.1
- LibBF version 2019-02-10 (AVX2 version)
- MPFFR 4.0.2 (static library)
- GMP 6.1.2 (static library)

### Discusion

The comparison is fair because:
- no multi-threading is used for both libraries ;
- both librairies use bit exact multiplication algorithms.

LibBF is slower than MPFR/GMP for numbers smaller than 1M
digits. However, for larger numbers it is up to 1.2x faster.

LibBF is slower for small numbers because its base case multiplication
is not optimized and because it has no specific algorithm for
intermediate size numbers (such as Karatsuba, Toom-Cook or floating point
FFT multiplication).

Fabrice Bellard - http://bellard.org/