#11657: the vector(...) function is extremely slow
------------------------------+---------------------------------------------
   Reporter:  was             |          Owner:  jason, was  
       Type:  defect          |         Status:  needs_review
   Priority:  minor           |      Milestone:  sage-4.7.2  
  Component:  linear algebra  |       Keywords:              
Work_issues:                  |       Upstream:  N/A         
   Reviewer:                  |         Author:  Rob Beezer  
     Merged:                  |   Dependencies:              
------------------------------+---------------------------------------------

Comment(by was):

 Your examples above, with large n, are probably unfair, since they are
 much less likely.  I'm still concerned by how very slow this is with
 smaller n, e.g., even with your patch:
 {{{
 sage:  timeit('vector(ZZ,50)')
 625 loops, best of 3: 44.3 µs per loop
 sage:  timeit('(ZZ^50).zero_vector()')
 625 loops, best of 3: 9.58 µs per loop
 }}}

 I'm posting a new version of your patch that is pretty much "optimal":
 {{{
 sage: timeit('vector(ZZ,50)')
 625 loops, best of 3: 9.7 µs per loop
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11657#comment:3>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to