#17819: Use unsigned long for Integer.divisors
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  minor              |    Milestone:  sage-6.6
      Component:  c_lib              |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Jeroen Demeyer     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/jdemeyer/ticket/17819            |  3bc79b71b49aa37b7307174f29e228a6c2bc81f6
   Dependencies:  #17794, #10257     |     Stopgaps:
-------------------------------------+-------------------------------------
Description changed by jdemeyer:

Old description:

> The `divisors` method of `Integer` is implemented using `long long` if
> possible. However, it would be better to use `unsigned long` for this.
> One advantage is that we no longer need the `mpz_set_longlong()`
> functions from `c_lib`. This will also be faster for small inputs on
> 32-bit systems.

New description:

 The `divisors` method of `Integer` is implemented using `long long` if
 possible. However, it would be better to use `unsigned long` for this. One
 advantage is that we no longer need the `mpz_set_longlong()` functions
 from `c_lib`. This will also be faster for small inputs on 32-bit systems.
 On 64-bit systems, there should be no speed difference (except perhaps a
 small speed-up due to skipping the `mpz_longlong` overhead and the fact
 that we use 64 instead of 63 bits).

--

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