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-40557: Minor optimization for integer conversion to double
```
x = 2^553
%timeit float(x)
before:
114 ns ± 4.77 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops
each)
after:
106 ns ± 0.827 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops
each)
```
just avoid calling the function unless absolutely needed.
### 📝 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#40557
Reported by: user202729
Reviewer(s): Travis Scrimshaw
0 commit comments