diff options
author | Lenny Maiorani <lenny@colorado.edu> | 2021-05-19 08:54:19 -0600 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-05-19 21:21:03 +0100 |
commit | 2b64d163cd9f25bd2951bf8721ef9325decb1b72 (patch) | |
tree | 1c58cbc0a921bd8fd52df015fe0983dd93530f3a /Tests/AK/TestQuickSort.cpp | |
parent | 4aaf8df8657b21cfd5e1744a54b2e8b071906b6c (diff) | |
download | serenity-2b64d163cd9f25bd2951bf8721ef9325decb1b72.zip |
Tests: static vs non-static constexpr variables
Problem:
- `static` variables consume memory and sometimes are less
optimizable.
- `static const` variables can be `constexpr`, usually.
- `static` function-local variables require an initialization check
every time the function is run.
Solution:
- If a global `static` variable is only used in a single function then
move it into the function and make it non-`static` and `constexpr`.
- Make all global `static` variables `constexpr` instead of `const`.
- Change function-local `static const[expr]` variables to be just
`constexpr`.
Diffstat (limited to 'Tests/AK/TestQuickSort.cpp')
0 files changed, 0 insertions, 0 deletions