Nemo

Overview | News | Features | Documentation | Benchmarks | Releases | Development | Authors | References

Benchmarks

This page shows how Nemo compares to other computer algebra software on a selection of artificial benchmarks.

Fateman benchmark

This benchmark tests generic polynomial arithmetic. Note that we don't have a dedicated multivariate polynomial module in Nemo yet, so this and the next benchmark are done with nested univariate polynomial rings. Where possible we do the same thing in the other systems we time (Pari/GP is an exception).

SageMath 6.8 Pari/GP 2.7.4 Magma V2.21-4 Nemo-0.3
132s 156s 233s 44s

Pearce benchmark

This benchmark is usually done with sparse multivariate polynomial arithmetic. We use it here with our recursive dense polynomial arithmetic (there is no sparse polynomial representation in Nemo yet).

Note: this is not fair to other packages that implement sparse multivariate polynomial arithmetic, as they could complete this benchmark faster if we used their sparse arithmetic. But that would not be a very meaningful benchmark if the aim is to measure the relative performance of the recursive dense polynomial arithmetic in Nemo. On the other hand, Pari/GP uses a sparse-recursive representation (similar to recursive-dense, but with dedicated zero objects in each ring).

SageMath 6.8 Pari/GP 2.7.4 Magma V2.21-4 Nemo-0.3
2900s 798s 647s 167s

Resultant benchmark

This benchmark is designed to test generics, division and computation of the resultant.

SageMath 6.8 Pari/GP 2.7.4 Magma V2.21-4 Nemo-0.3
179907s N/A 82s 0.2s

Bernoulli polynomials

This benchmark is designed to test generic power series.

SageMath 6.8 Pari/GP 2.7.4 Magma V2.21-4 Nemo-0.3
161s 235s 4223s 65s

Polynomials over number fields

This benchmark is designed to test dense polynomials over number fields.

SageMath 6.8 Pari/GP 2.7.4 Magma V2.21-4 Nemo-0.3
6.92s 0.21s 0.70s 0.13s

Determinant over a commutative ring

This benchmark is designed to test determinant over a generic commutative ring. Note Pari cheats here and does divisions, which will occasionally cause it to fail on such examples.

Magma exhausts the memory on the machine after some hours. Timings indicate it uses an exponential algorithm which would take > 42369865294301626368s were it given infinite memory.

SageMath 6.8 Pari/GP 2.7.4 Magma V2.21-4 Nemo-0.4
43.5s 456s - 7.5s

Determinant over a field

This benchmark is designed to test determinant over a field where there is coefficient blowup.

SageMath 6.8 Pari/GP 2.7.4 Magma V2.21-4 Nemo-0.4
5893s 21.9s 5.3s 2.4s

Determinant of a matrix over a polynomial ring

This benchmark is designed to test determinant over a polynomial ring over an integral domain.

SageMath 6.8 Pari/GP 2.7.4 Magma V2.21-4 Nemo-0.4
6.3s 1.3s 3.2s 0.24s

Linear solving over a polynomial ring

The computation finds a 20x1 matrix v over ZZ[x][y] and a denominator d in ZZ[x][y] such that Av = db.

This benchmark is designed to test linear solving over a generic polynomial ring.

SageMath exhausted the memory on the machine and didn't complete, possibly because it doesn't reduce the bivariate rational functions that result, at any stage. On the other hand, we were forcing SageMath to work in iterated univariate polynomial rings rather than a true bivariate polynomial ring, which may explain the slowdown and memory use.

Magma requires the computation to be performed over the fraction field.

SageMath 6.8 Pari/GP 2.7.4 Magma V2.21-4 Nemo-0.4
> 100000s > 1300000s 90s 7s

Characteristic polynomial of a matrix over the integers

This benchmark doesn't really test Nemo but the underlying Flint library. However, the benchmark resulted from work done in Nemo that got moved into Flint. Julia code can be quite easy to port to C in certain circumstances.

SageMath 6.9 Pari/GP 2.7.4 Magma V2.21-4 Giac-1.2.2 Nemo-0.4
0.20s 0.58s 0.06s 0.06s 0.04s

Minimal polynomial of a matrix over a gcd domain

This benchmark tests minimal polynomial over a gcd domain (i.e. not over a field).

Magma refuses to do this computation and Sage throws an exception. Pari/GP was terminated due to long running.

SageMath 6.9 Pari/GP 2.7.4 Magma V2.21-4 Nemo-0.4
-- > 680000s -- 0.6s

Minimal polynomial of a matrix over a finite field

This benchmark tests minimal polynomial over a finite field, and finite field arithmetic.

Magma is so fast in this example because it uses Zech logarithms and because it just has very fast finite field arithmetic. We are currently using generic matrices over Flint finite field elements and we are not using Zech logarithms. Both are areas for future improvement.

SageMath 6.9 Pari/GP 2.7.4 Magma V2.21-4 Nemo-0.4
10.6s 2515s 0.005s 0.4s

Minimal polynomial of a matrix over the integers

This benchmark doesn't really test Nemo, but Flint. However the implementation was a result of work carried out first in Nemo and then ported to Flint.

Pari/GP eventually exhausted the memory on the machine and did not complete.

SageMath 6.9 Pari/GP 2.7.4 Magma V2.21-4 Nemo-0.4
0.07s > 600000s 0.05s 0.04s

Last updated: 2017-08-05 13:03:41 GMT

Contact: William Hart, nemo-devel mailing list.

Logo background due to Giacomo Merculiano.