#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:
-------------------------------------+-------------------------------------
Description changed by vdelecroix:

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 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])

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. Using
 [http://trac.sagemath.org/attachment/ticket/18241/polyhedron_test.py
 polyhedron_test.py] I got

 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])

--

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