#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:23 bhutz]:
 > We could put a try/except in call and init them in the except. Any idea
 how much overhead a try block adds? As far as I can tell in a couple tests
 it doesn't actually add an execution time. If that's the case, then there
 is no reason not to do it lazily.

 Python is designed to let "try" be very fast. If an exception occurs there
 is a bit larger penalty but in this case it wouldn't be measurable
 compared to the `fast callable`.

 The recommended way to store the fast_callable would be by accessing them
 through a `cached_method` or a `lazy_attribute`. See their docstrings for
 examples. Just don't go sticking `cached_method` decorators on methods
 arbitrarily. That's how we get memory leaks :-).

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