sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.43k stars 479 forks source link

Change default algorithm for computing homology to 'pari' #20726

Closed jhpalmieri closed 8 years ago

jhpalmieri commented 8 years ago

In recent tests, using pari is faster than Sage's current default algorithm for computing homology groups of chain complexes. For example:

sage: %timeit simplicial_complexes.RandomComplex(12, 4).chain_complex().homology(algorithm='auto')
1 loop, best of 3: 7.84 s per loop
sage: %timeit simplicial_complexes.RandomComplex(12, 4).chain_complex().homology(algorithm='pari')
1 loop, best of 3: 1.11 s per loop

So change the default setting for the keyword algorithm from 'auto' to 'pari'.

Depends on #20723

CC: @tscrim

Component: algebraic topology

Keywords: days74

Author: John Palmieri

Branch/Commit: 21516fe

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/20726

jhpalmieri commented 8 years ago
comment:1

It also appears to be faster to compute the entire chain complex rather than compute a contractible subcomplex and use the relative chain complex. So we should use enlarge=False as the default in the _homology_ method for simplicial complexes.

jhpalmieri commented 8 years ago
comment:2

Okay, it looks like sometimes enlarge=True is faster, sometimes slower. When it's slower, it's not much slower. So we'll leave it as is.

jhpalmieri commented 8 years ago

New commits:

7ff985atrac 20723: remove most uses of **kwds in sage/homology,
8da379aadd the correct ticket number in call to @rename_keyword
8efbc40homology computations: use pari by default
4b30dffpass **kwds to `_homology_` method
3ff9caemerge with #20723
jhpalmieri commented 8 years ago

Changed keywords from none to days74

jhpalmieri commented 8 years ago

Branch: u/jhpalmieri/homology_pari

jhpalmieri commented 8 years ago

Commit: 3ff9cae

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

21516feCHomP is optional, not experimental
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Changed commit from 3ff9cae to 21516fe

tscrim commented 8 years ago

Reviewer: Travis Scrimshaw

vbraun commented 8 years ago

Changed branch from u/jhpalmieri/homology_pari to 21516fe