sagemath / sage

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

Cythonize algebraic topological model #20114

Closed tscrim closed 8 years ago

tscrim commented 8 years ago

algebraic_topological_model.py contains help classes and functions for computing (co)homology of simplicial complexes; in particular, the cup product for the cohomology ring. As such, it contains the main bottlenecks for these computations and should be cythonized.

Depends on #20103

CC: @jhpalmieri

Component: algebraic topology

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

tscrim commented 8 years ago
comment:1

Okay, here is the cythonized version. However, from some testing, I did not get any speedup. I'm posting this here if it might have been from my lack of cython skills. The other thing to do would be to do some heavy-duty profiling, but I don't know how much we will get from cythonization of ATM.


New commits:

6fb881atrac 20103: some clean up for cell complexes
caef059Trac 20103: Decorate some methods with "@abstract_method".
1440698merge with 7.1.beta5
eb6281eCythonization of algebraic_topological_model.
tscrim commented 8 years ago

Branch: public/homology/cythonize_atm-20114

tscrim commented 8 years ago

Commit: eb6281e

jhpalmieri commented 8 years ago
comment:2

I agree, I don't see much if any speedup. Maybe in our previous work, we already pushed the main bottlenecks into matrix code?

tscrim commented 8 years ago

Changed branch from public/homology/cythonize_atm-20114 to none

tscrim commented 8 years ago

Changed commit from eb6281e to none

tscrim commented 8 years ago
comment:3

At least 60% of the time for RP4 is taken up in the vector/matrix multiplications (I love %lprun). So I don't think it is worth the extra compile time by cythonizing this and setting this to invalid.

tscrim commented 8 years ago

Changed author from Travis Scrimshaw to none

jhpalmieri commented 8 years ago
comment:4

Okay, but thanks for working on it.