#11559: Speed up Posets and toric Chow group
------------------------------------------+--------------------------------
       Reporter:  vbraun                  |        Owner:
           Type:  enhancement             |       Status:  needs_review
       Priority:  major                   |    Milestone:  sage-5.13
      Component:  algebraic geometry      |   Resolution:
       Keywords:  toric, sd40.5           |    Merged in:
        Authors:  Volker Braun            |    Reviewers:  Andrey
Report Upstream:  N/A                     |  Novoseltsev
         Branch:                          |  Work issues:
   Dependencies:  #11558, #10998, #13023  |       Commit:
                                          |     Stopgaps:
------------------------------------------+--------------------------------

Old description:

> To my surprise, computing the Chow group spends most of the time
> comparing cones instead of doing linear algebra. 3/4 of the time is spent
> in `PosetElement.__eq__()`:
> {{{
>    return self.parent() == other.parent() \
>           and self.element == other.element \
>           and self.vertex == other.vertex
> }}}
> Reordering this to first compare `self.vertex == other.vertex` speeds it
> up dramatically.
>
> Patch has some other fixes. Changes the chow group to use sparse
> matrices.
>
> Apply:
>
> - [attachment:trac_11559_fix_Chow_group.2.patch]
> - [attachment:trac_11559_hasattr_vertex_fc.patch]

New description:

 To my surprise, computing the Chow group spends most of the time comparing
 cones instead of doing linear algebra. 3/4 of the time is spent in
 `PosetElement.__eq__()`:
 {{{
    return self.parent() == other.parent() \
           and self.element == other.element \
           and self.vertex == other.vertex
 }}}
 Reordering this to first compare `self.vertex == other.vertex` speeds it
 up dramatically.

 Patch has some other fixes. Changes the chow group to use sparse matrices.

 Apply:

 - [attachment:trac_11559_fix_Chow_group.2.patch]
 - [attachment:trac_11559_fixdoctest.patch]
 - [attachment:trac_11559_hasattr_vertex_fc.patch]

--

Comment (by chapoton):

 here a patch correcting the failing doctests

 Apply trac_11559_fix_Chow_group.2.patch trac_11559_fixdoctest.patch
 trac_11559_hasattr_vertex_fc.patch

--
Ticket URL: <http://trac.sagemath.org/ticket/11559#comment:18>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to