#15780: Increase Performance in Projective Morphism
-------------------------------------+-------------------------------------
       Reporter:  drose              |        Owner:  drose
           Type:  enhancement        |       Status:  needs_work
       Priority:  minor              |    Milestone:  sage-6.2
      Component:  algebraic          |   Resolution:
  geometry                           |    Merged in:
       Keywords:  Projective,        |    Reviewers:  Ben Hutz
  Morphism                           |  Work issues:
        Authors:  Dillon Rose        |       Commit:
Report Upstream:  N/A                |  6be7361b9186ede2ff230139c7972c9f38fc8f94
         Branch:                     |     Stopgaps:
  u/bhutz/ticket/15780               |
   Dependencies:  #16051             |
-------------------------------------+-------------------------------------

Comment (by nbruin):

 Replying to [comment:20 drose]:
 > I used timeit on a random degree 3 map on P^3^ and it took 717
 microseconds per loop.  This is very fast and doesn't really warrant lazy
 initialization.

 Whether 717 ms is a lot depends on what you compare it to. I'm finding (on
 6.0):
 {{{
 sage: P5=ProjectiveSpace(Rationals(),5)
 sage: R=P2.coordinate_ring()
 sage: mon=[R({tuple(a):1}) for a in
 WeightedIntegerVectors(4,[1,1,1,1,1,1])]
 sage: L=[sum(random_sublist(mon,0.1)) for j in [0..5]]
 sage: %timeit P2.hom(L,P2)
 10000 loops, best of 3: 63.3 us per loop
 sage: %timeit [fast_callable(l) for l in L]
 100 loops, best of 3: 1.94 ms per loop
 }}}
 as you see, creating the fast callables is *much* slower than creating the
 map. If you increase the polynomials in L (by increasing the degree of the
 monomials, for instance), the difference gets worse. I'd say that's enough
 time penalty to hold off on it unless you actually need the
 fast_callables.

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