Opened 5 years ago

Closed 5 years ago

#20726 closed enhancement (fixed)

Change default algorithm for computing homology to 'pari'

Reported by: jhpalmieri Owned by:
Priority: major Milestone: sage-7.3
Component: algebraic topology Keywords: days74
Cc: tscrim Merged in:
Authors: John Palmieri Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 21516fe (Commits, GitHub, GitLab) Commit: 21516feb5c0d993935730fd1662941f5681a1e9c
Dependencies: #20723 Stopgaps:

Status badges


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'.

Change History (6)

comment:1 Changed 5 years ago by jhpalmieri

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.

comment:2 Changed 5 years ago by jhpalmieri

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.

comment:3 Changed 5 years ago by jhpalmieri

  • Branch set to u/jhpalmieri/homology_pari
  • Commit set to 3ff9cae7e8d86852e7646149abaac67f8c6173ae
  • Keywords days74 added
  • Status changed from new to needs_review

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

comment:4 Changed 5 years ago by git

  • Commit changed from 3ff9cae7e8d86852e7646149abaac67f8c6173ae to 21516feb5c0d993935730fd1662941f5681a1e9c

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

21516feCHomP is optional, not experimental

comment:5 Changed 5 years ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

comment:6 Changed 5 years ago by vbraun

  • Branch changed from u/jhpalmieri/homology_pari to 21516feb5c0d993935730fd1662941f5681a1e9c
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.