#4302: [with patch, needs review] improve modular composition in GF(2)[x]
------------------------------+---------------------------------------------
 Reporter:  zimmerma          |        Owner:  somebody
     Type:  task              |       Status:  new     
 Priority:  major             |    Milestone:  sage-3.2
Component:  basic arithmetic  |   Resolution:          
 Keywords:                    |  
------------------------------+---------------------------------------------
Comment (by malb):

 This is what I sent to Paul earlier about the patch

 >I've improved said implementation on my train ride after Sage Days. The
 result
 >is faster than Magma but only competitive with NTL. It seems NTL is
 already
 >faster than Magma for this problem and that the runtime is dominated by
 the
 >construction of the matrices (ntl.GF2X arithmetic mainly) and the
 recovery of
 >the result (ntl.GF2X arithmetic mainly). There is room for improvements
 >w.r.t. the conversion between ntl.GF2X and M4RI but I didn't bother yet
 >because ntl.GF2X arithmetic seems to be the main bottleneck for now. Note
 >that matrix multiplication takes up only a tiny fraction of the overall
 >runtime, it is almost negligible.
 >
 >Maybe, once we switch to the GF2X library things will look different
 enough to
 >motivate a better tuned conversion routine?

 {{{
 f = R.random_element(30000)
 g = R.random_element(30000)
 h = R.random_element(30000*10)
 }}}

 {{{
 %time
 set_verbose(1)
 _ = f.modular_composition(g,h)
 verbose 1 (1: , <module>) G 548 x 299999 16.331 s
 verbose 1 (1: , <module>) F 55 x 548 0.000 s
 verbose 1 (1: , <module>) H 55 x 299999 0.230 s
 verbose 1 (1: , <module>) Res 6.359 s
 CPU time: 22.98 s,  Wall time: 23.42 s
 }}}

 {{{
 %time _ = f.modular_composition(g,h,'ntl')
 verbose 1 (1: , <module>) NTL 23.998 s
 CPU time: 24.07 s,  Wall time: 24.72 s
 }}}

 {{{
 fm = f._magma_()
 gm = g._magma_()
 hm = h._magma_()
 t = magma.cputime()
 _ = fm.ModularComposition(gm,hm)
 magma.cputime(t)
 83.810000000000002
 }}}

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