#18241: Great speedup in polytopes construction with generic backend
-------------------------------------+-------------------------------------
       Reporter:  vdelecroix         |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.7
      Component:  geometry           |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Vincent Delecroix  |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/vdelecroix/18241                 |  99c670831a4064246d2cdb2aec32a3e51fd4fd7c
   Dependencies:  #18215             |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by {'newvalue': u'Vincent Delecroix', 'oldvalue': ''}):

 * status:  new => needs_review
 * commit:   => 99c670831a4064246d2cdb2aec32a3e51fd4fd7c
 * branch:   => u/vdelecroix/18241
 * author:   => Vincent Delecroix


Old description:

> Construction of polytopes with number field coordinates are very slow.
> There are several reasons for that:
>   - quadratic number field element hash is slow (already solved in
> #18215)
>   - `NumberField.__cmp__` is slow
>   - we can avoid many useless copies and recomputation in the algorithm
> `Vrep2Hrep` and `Hrep2Vrep`
>
> After applying the branch the speedup is really cool...
>
> Before
> {{{
> sage: %runfile polyhedron_test.py
> sage: %time gr = great_rhombicuboctahedron()
> CPU times: user 4.66 s, sys: 24 ms, total: 4.68 s
> Wall time: 4.66 s
> }}}
> After
> {{{
> sage: %runfile polyhedron_test.py
> sage: %time gr = great_rhombicuboctahedron()
> CPU times: user 292 ms, sys: 28 ms, total: 320 ms
> Wall time: 306 ms
> }}}
>
> (But I am still not able to build the
> [http://en.wikipedia.org/wiki/600-cell 600-cell])

New description:

 Construction of polytopes with number field coordinates are very slow.
 There are several reasons for that:
   - quadratic number field element hash is slow (already solved in #18215)
   - `NumberField.__cmp__` is slow
   - we can avoid many useless copies and recomputations in the algorithm
 `Vrep2Hrep` and `Hrep2Vrep`

 After applying the branch the speedup is really cool...

 Before
 {{{
 sage: %runfile polyhedron_test.py
 sage: %time gr = great_rhombicuboctahedron()
 CPU times: user 4.66 s, sys: 24 ms, total: 4.68 s
 Wall time: 4.66 s
 }}}
 After
 {{{
 sage: %runfile polyhedron_test.py
 sage: %time gr = great_rhombicuboctahedron()
 CPU times: user 292 ms, sys: 28 ms, total: 320 ms
 Wall time: 306 ms
 }}}

 (But I am still not able to build the
 [http://en.wikipedia.org/wiki/600-cell 600-cell])

--

Comment:

 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=3ec20b4245a23f27931b00e54256743709e38e18
 3ec20b4]||{{{Trac 18215: Faster hash for quadratic number fields}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=562d81a875d02282f9793152ff48057cc9e5e194
 562d81a]||{{{Trac 18241: better double description (Hrep2Vrep,
 Vrep2Hrep)}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=e28fdffe707336b2704eb11010ccf2528e4a60c0
 e28fdff]||{{{Trac 18241: tiny modifs in constructor/parent}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=99c670831a4064246d2cdb2aec32a3e51fd4fd7c
 99c6708]||{{{Trac 18241: trivial case in NumberField.__cmp__}}}||

--
Ticket URL: <http://trac.sagemath.org/ticket/18241#comment:1>
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/d/optout.

Reply via email to