Skip to content
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
Next Next commit
Clarify exact value
  • Loading branch information
brandtbucher committed Sep 30, 2024
commit 130eede300efae17404ae44609842acd3f2bac46
2 changes: 1 addition & 1 deletion Python/optimizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ translate_bytecode_to_trace(
int bitcount = _Py_popcount32(counter);
int jump_likely = bitcount > 8;
/* If bitcount is 8 (half the jumps were taken), adjust confidence by 50%.
If it's 16 or 0 (all or none were taken), adjust by ~6%
If it's 16 or 0 (all or none were taken), adjust by 1/18th.
(since the future is still somewhat uncertain - see Laplace's
rule of succession, used here with 16 observations).
For values in between, adjust proportionally. */
Expand Down