#16880: even faster prime_powers
--------------------------------------+----------------------------
       Reporter:  vdelecroix          |        Owner:
           Type:  enhancement         |       Status:  needs_review
       Priority:  major               |    Milestone:  sage-6.4
      Component:  number theory       |   Resolution:
       Keywords:                      |    Merged in:
        Authors:  Vincent Delecroix   |    Reviewers:
Report Upstream:  N/A                 |  Work issues:
         Branch:  u/vdelecroix/16880  |       Commit:
   Dependencies:  #16869, #16878      |     Stopgaps:
--------------------------------------+----------------------------
Changes (by vdelecroix):

 * status:  new => needs_review
 * branch:   => u/vdelecroix/16880


Old description:

> The cythonization of `prime_powers` is much faster (around x4 in the
> timings). We also introduce the keyword `py_ints` as in `prime_range` in
> order to be able to use Python int instead of Sage integers.
>
> Note: I do not like the convention that the name are different
> `prime_powers` vs `prime_range`... why not using `primes` or
> `prime_power_range`?

New description:

 The cythonization of `prime_powers` is much faster (around x4 in the
 timings). We introduce in a new function `prime_power_range` in
 `fast_arith.pyx` (that also has a keyword `py_ints` as `prime_range`).

 Note: naming conventions are crazy... right now there are:
  - `primes`: iterator over prime numbers
  - `prime_range`: return the list of the first prime (fast implementation
 in Cython but only handles integer up to `LONG_MAX` and require memory)
  - `prime_powers`: return the list of prime powers!
 It seems to me that in Sage we tend to have `X_iterator` for iterator and
 `Xs` for the list of objects...

--

--
Ticket URL: <http://trac.sagemath.org/ticket/16880#comment:2>
Sage <http://www.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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to