#15038: Improve startuptime by postponing the creation of argspecs of cached
functions/methods
-------------------------------------------------+-------------------------
       Reporter:  SimonKing                      |        Owner:
           Type:  enhancement                    |       Status:
       Priority:  major                          |  positive_review
      Component:  performance                    |    Milestone:  sage-5.12
       Keywords:  cached method, argspec,        |   Resolution:
  introspection, startup                         |    Merged in:
        Authors:  Simon King                     |    Reviewers:  Travis
Report Upstream:  N/A                            |  Scrimshaw
         Branch:                                 |  Work issues:
   Dependencies:                                 |       Commit:
                                                 |     Stopgaps:
-------------------------------------------------+-------------------------
Changes (by tscrim):

 * status:  needs_review => positive_review
 * reviewer:   => Travis Scrimshaw


Comment:

 Hey Simon,

 Here are my timings with patch (same setup):
 {{{
 sage: %timeit f(1)
 100000 loops, best of 3: 1.37 us per loop
 sage: %timeit f(1,2)
 100000 loops, best of 3: 1.5 us per loop
 sage: %timeit f(a=1,b=2)
 100000 loops, best of 3: 3.73 us per loop
 sage: %timeit c.b(1,x=4)
 100000 loops, best of 3: 4 us per loop
 sage: %timeit c.b(1,4)
 100000 loops, best of 3: 1.67 us per loop
 }}}
 and without:
 {{{
 sage: %timeit f(1)
 100000 loops, best of 3: 1.44 us per loop
 sage: %timeit f(1,2)
 100000 loops, best of 3: 1.55 us per loop
 sage: %timeit f(a=1,b=2)
 100000 loops, best of 3: 3.79 us per loop
 sage: %timeit c.b(1,x=4)
 100000 loops, best of 3: 4.02 us per loop
 sage: %timeit c.b(1,4)
 100000 loops, best of 3: 1.64 us per loop
 }}}
 So I don't see any (statically) significant speed regression, nor do I
 expect a couple of simple C-level if statements to slow anything down. I
 also get a modest startup-time improvement of about 5%, so I'm happy with
 this patch.

 Best,[[BR]]
 Travis

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