#6208: [with patch, needs review] Improving gap interface by pre-compiling 
certain
regular expressions
-------------------------+--------------------------------------------------
 Reporter:  SimonKing    |       Owner:  SimonKing                              
     Type:  enhancement  |      Status:  new                                    
 Priority:  major        |   Milestone:  sage-4.0.2                             
Component:  interfaces   |    Keywords:  gap interface expect regular expression
-------------------------+--------------------------------------------------

Comment(by SimonKing):

 Replying to [comment:1 SimonKing]:
 > So, I would appreciate a better (more stable) example.

 Perhaps the one below. Since there is no caching involved, one can do
 ``timeit`` and gets more reliable times. Moreover, it uses the interface
 more directly.

 Without the patch:
 {{{
 sage: G=SymmetricGroup(7)
 sage: g=G._gap_()
 sage: l=g.Elements()
 sage: timeit ("L=[gap.eval(l.name()+'[%d]^2'%(i)) for i in
 range(1,7.factorial()+1)]")
 5 loops, best of 3: 3.18 s per loop
 }}}

 With the patch:
 {{{
 sage: G=SymmetricGroup(7)
 sage: g=G._gap_()
 sage: l=g.Elements()
 tsage: timeit ("L=[gap.eval(l.name()+'[%d]^2'%(i)) for i in
 range(1,7.factorial()+1]")
 5 loops, best of 3: 1.93 s per loop
 }}}

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