#2737: [with patch, positive review] add balanced_sum to Sage
------------------------------+---------------------------------------------
 Reporter:  mhansen           |       Owner:  somebody  
     Type:  enhancement       |      Status:  new       
 Priority:  minor             |   Milestone:  sage-4.1.1
Component:  basic arithmetic  |    Keywords:            
 Reviewer:  Jason Grout       |      Author:            
   Merged:                    |  
------------------------------+---------------------------------------------
Changes (by jason):

  * reviewer:  => Jason Grout


Comment:

 Some timing info for the tour, comparing balanced sum with the builtin
 sum.

 {{{
 sage: a=range(10e6)
 sage: %timeit sum(a)
 10 loops, best of 3: 2.58 s per loop
 sage: %timeit balanced_sum(a)
 10 loops, best of 3: 891 ms per loop
 sage: balanced_sum(a)==sum(a)
 True
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/2737#comment:6>
Sage <http://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