You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sagemathgh-40734: Avoid mutate Integer.value at a few more places, remove sig_occurred() check in Integer fast_tp_dealloc
Follow-up to sagemath#40556. Now the `sig_occurred()` check in `fast_tp_dealloc`
is removed.
------
This is the effect on the last commit, changing `divisors()` to use
`sig_check()`.
Before:
```
sage: n = prod(primes_first_n(17))
....: %timeit ignore = n.divisors()
20 ms ± 245 μs per loop (mean ± std. dev. of 7 runs, 10 loops each)
sage: n = prod(primes_first_n(17))
....: %timeit ignore = n.divisors()
20.5 ms ± 616 μs per loop (mean ± std. dev. of 7 runs, 10 loops each)
sage: n = prod(primes_first_n(17))
....: %timeit ignore = n.divisors()
20 ms ± 302 μs per loop (mean ± std. dev. of 7 runs, 10 loops each)
```
After:
```
sage: n = prod(primes_first_n(17))
....: %timeit ignore = n.divisors()
20.6 ms ± 424 μs per loop (mean ± std. dev. of 7 runs, 10 loops each)
sage: n = prod(primes_first_n(17))
....: %timeit ignore = n.divisors()
20.5 ms ± 254 μs per loop (mean ± std. dev. of 7 runs, 10 loops each)
sage: n = prod(primes_first_n(17))
....: %timeit ignore = n.divisors()
20.7 ms ± 206 μs per loop (mean ± std. dev. of 7 runs, 10 loops each)
```
### 📝 Checklist
<!-- Put an `x` in all the boxes that apply. -->
- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.
### ⌛ Dependencies
<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
URL: sagemath#40734
Reported by: user202729
Reviewer(s):
0 commit comments