Commit 890a649
Release Manager
gh-40734: Avoid mutate Integer.value at a few more places, remove sig_occurred() check in Integer fast_tp_dealloc
Follow-up to #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,
-->
<!-- - #12345: short description why this is a dependency -->
<!-- - #34567: ... -->
URL: #40734
Reported by: user202729
Reviewer(s):
2 files changed
+140
-111
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments