Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
We avoid multiple imports caused by #30022: Before (and with #30022): {{{ sage: a = 1/1000 sage: %timeit a.__pari__() 810 ns ± 2.33 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) sage: p = a.__pari__() sage: %timeit QQ(p) 1.52 µs ± 1.37 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) sage: a = 12314 sage: %timeit a.__pari__() 723 ns ± 0.804 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) sage: p = a.__pari__() sage: %timeit ZZ(p) 715 ns ± 1.32 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) sage: %timeit a.divisors(method='pari') 1.23 µs ± 1.51 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) sage: %timeit a.is_prime_power() 647 ns ± 0.164 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) sage: %timeit a.is_prime() 604 ns ± 0.486 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) sage: %timeit a.factor() 3.6 µs ± 13.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) }}} Reverting #30022: {{{ sage: a = 1/1000 sage: %timeit a.__pari__() 221 ns ± 0.289 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) sage: p = a.__pari__() sage: %timeit QQ(p) 810 ns ± 0.852 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) sage: a = 12314 sage: %timeit a.__pari__() 176 ns ± 0.217 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) sage: p = a.__pari__() sage: %timeit ZZ(p) 150 ns ± 0.104 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) sage: %timeit a.divisors(method='pari') 643 ns ± 1.38 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) sage: %timeit a.is_prime_power() 53.9 ns ± 0.336 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) sage: %timeit a.is_prime() 58 ns ± 0.174 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) sage: %timeit a.factor() 2.99 µs ± 4.62 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) }}} With this ticket: {{{ sage: a = 1/1000 sage: %timeit a.__pari__() 274 ns ± 0.344 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) sage: p = a.__pari__() sage: %timeit QQ(p) 867 ns ± 0.999 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) sage: a = 12314 sage: %timeit a.__pari__() 200 ns ± 0.0656 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) sage: p = a.__pari__() sage: %timeit ZZ(p) 183 ns ± 0.179 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) sage: %timeit a.divisors(method='pari') 673 ns ± 0.928 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each) sage: %timeit a.is_prime_power() 88.4 ns ± 0.075 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) sage: %timeit a.is_prime() 68.9 ns ± 0.0878 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) sage: %timeit a.factor() 3.19 µs ± 10.2 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) }}} URL: https://trac.sagemath.org/32775 Reported by: gh-kliem Ticket author(s): Jonathan Kliem Reviewer(s): Matthias Koeppe, Samuel Lelièvre
- Loading branch information