#3925: [with SPKG, needs review] Wrap Bernstein 's primegen
---------------------------+------------------------------------------------
 Reporter:  robertwb       |       Owner:  was       
     Type:  enhancement    |      Status:  new       
 Priority:  major          |   Milestone:  sage-4.1.1
Component:  number theory  |    Keywords:            
 Reviewer:                 |      Author:            
   Merged:                 |  
---------------------------+------------------------------------------------

Comment(by cremona):

 To adopt this spkg as part of Sage
 proper would need a vote on sage-devel.  I suggest that wjp helps that
 process
 by collecting some data (before and after).  For example:
 {{{
 sage: time P = prime_range(10^8)
 CPU times: user 1.83 s, sys: 0.50 s, total: 2.32 s
 Wall time: 2.33 s
 sage: len(P)
 5761455
 }}}
 but this does not use the new PrimeGen class.  I tried this (with the
 new spkg + patch):
 {{{
 sage: pg=Primes().pg
 sage: pg.reset()
 sage: N=pg.count(10^8)
 sage: pg.reset()
 sage: time P=[pg.next() for _ in range(N)]
 CPU times: user 4.98 s, sys: 0.03 s, total: 5.01 s
 Wall time: 5.02 s
 }}}
 which is slower but it's using a more stupid method to collect the
 primes that in prime_range().

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