#4100: [with patch, needs review] comparison with None extraordinarily slow
------------------------------+---------------------------------------------
 Reporter:  robertwb          |        Owner:  somebody  
     Type:  defect            |       Status:  new       
 Priority:  major             |    Milestone:  sage-3.1.3
Component:  basic arithmetic  |   Resolution:            
 Keywords:                    |  
------------------------------+---------------------------------------------
Changes (by robertwb):

  * summary:  comparison with None extraordinarily slow => [with patch,
              needs review] comparison with None
              extraordinarily slow

Comment:

 Before

 {{{
 sage: timeit("1 == None")
 625 loops, best of 3: 625 µs per loop
 }}}

 After

 {{{
 sage: timeit("1 == None")
 625 loops, best of 3: 530 ns per loop
 }}}

 This is at least close to

 {{{
 sage: timeit("1 is None")
 625 loops, best of 3: 330 ns per loop
 }}}

 but people who don't know about the {{{is}}} operator shouldn't be hit
 that bad...

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4100#comment:1>
SAGE <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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