The following constant values can be safely computed at compile time, but are currently computing at runtime.
[refactor] Moved simple math calculations from runtime to compile time. #28947
pull 23rd wants to merge 1 commits into bitcoin:master from 23rd:patch-1-constexpr changing 13 files +24 −24-
23rd commented at 2:08 PM on November 27, 2023: none
-
DrahtBot commented at 2:08 PM on November 27, 2023: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage
For detailed information about the code coverage, see the test coverage report.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process. A summary of reviews will appear here.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #28358 (Double -dbache maximum to 32GB by Sjors)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
-
hebasto commented at 2:11 PM on November 27, 2023: member
Changes to the
leveldbsubtree must be submitted to upstream, not to this repo. -
[refactor] Moved simple math calculations from runtime to compile time. 4fd7742bee
- DrahtBot added the label CI failed on Nov 27, 2023
-
23rd commented at 2:32 PM on November 27, 2023: none
Changes to the
leveldbsubtree must be submitted to upstream, not to this repo.Thanks. Have updated the commit.
-
maflcko commented at 2:37 PM on November 27, 2023: member
are currently computing at runtime.
Do you have any referenced to support your claim? IIRC all supported compilers treat
static const int = ..literal..;as a compile-time constant.If there is a reason to do the changes, it should ideally be enforced with a linter/tidy check, no?
- 23rd closed this on Nov 27, 2023
- bitcoin locked this on Nov 26, 2024