10000 bpo-45527: Don't count cache hits, just misses. by markshannon · Pull Request #29092 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-45527: Don't count cache hits, just misses. #29092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 20, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Explain 53.
  • Loading branch information
markshannon committed Oct 20, 2021
commit 8928acd0d68ade4bf0579724c2a06b9d3bbd4815
9 changes: 8 additions & 1 deletion Python/specialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,14 @@ _Py_Quicken(PyCodeObject *code) {

static inline int
initial_counter_value(void) {
/* Choose a prime number ~50 */
/* Starting value for the counter.
* This value needs to be not too low, otherwise
* it would cause excessive de-optimization.
* Neither should it be too high, or that would delay
* de-optimization excessively when it is needed.
* A value around 50 seems to work, and we choose a
* prime number to avoid artifacts.
*/
return 53;
}

Expand Down
0