#5519: [with patch, positive review] Irreducibility test is slow for polynomials
over GF(2)
-------------------------+--------------------------------------------------
 Reporter:  rhinton      |       Owner:  rhinton
     Type:  enhancement  |      Status:  new    
 Priority:  major        |   Milestone:         
Component:  algebra      |    Keywords:         
-------------------------+--------------------------------------------------

Comment(by mvngu):

 On Debian 5.0 Lenny with the following system info:
 {{{
 kernel: 2.6.24-1-686
 CPU: Intel(R) Celeron(R) 2.00GHz
 RAM: 1.0GB
 }}}
 here are some timing statistics:
 {{{
 # BEFORE

 sage: P.<x> = GF(2)[]
 sage: f = P.random_element(1000)
 sage: %timeit f.is_irreducible()
 10 loops, best of 3: 1.14 s per loop
 sage:
 sage: f = P.random_element(10000)
 sage: %time f.is_irreducible()
 CPU times: user 4972.13 s, sys: 2.83 s, total: 4974.95 s
 Wall time: 5043.02 s
 False


 # AFTER

 sage: P.<x> = GF(2)[]
 sage: f = P.random_element(1000)
 sage: %timeit f.is_irreducible()
 10000 loops, best of 3: 40.7 µs per loop
 sage:
 sage: f = P.random_element(10000)
 sage: %timeit f.is_irreducible()
 1000 loops, best of 3: 930 µs per loop
 sage:
 sage:
 sage: f = P.random_element(100000)
 sage: %timeit f.is_irreducible()
 10 loops, best of 3: 27.6 ms per loop
 }}}
 That is, a "before" 1.14 seconds vs. an "after" 40.7 microseconds,
 resulting in a speedup of 28x:
 {{{
 sage: a = 1.14 * 1000  # convert to microseconds
 sage: b = 40.7  # unit is microseconds
 sage: (a - b) / a
 0.964298245614035
 sage: a / b
 28.0098280098280
 }}}

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