Skip to content
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

GH-98686: Quicken everything #98687

Merged
merged 12 commits into from
Nov 2, 2022
Prev Previous commit
Next Next commit
ADAPTIVE_BACKOFF_START = 1
  • Loading branch information
brandtbucher committed Oct 15, 2022
commit 0a204e1b4066c3e946f246d9e24643e6dc20e6fd
4 changes: 2 additions & 2 deletions Include/internal/pycore_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ write_location_entry_start(uint8_t *ptr, int code, int length)

/* With a 16-bit counter, we have 12 bits for the counter value, and 4 bits for the backoff */
#define ADAPTIVE_BACKOFF_BITS 4
/* The initial counter value is 7 == 2**ADAPTIVE_BACKOFF_START - 1 */
#define ADAPTIVE_BACKOFF_START 3
/* The initial counter value is 1 == 2**ADAPTIVE_BACKOFF_START - 1 */
#define ADAPTIVE_BACKOFF_START 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for backoff, after failure. Do you want to change this, or just lower the initial counter value?


#define MAX_BACKOFF_VALUE (16 - ADAPTIVE_BACKOFF_BITS)

Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_dis.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ def extended_arg_quick():
"""% (extended_arg_quick.__code__.co_firstlineno,
extended_arg_quick.__code__.co_firstlineno + 1,)

QUICKENING_WARMUP_DELAY = 8
QUICKENING_WARMUP_DELAY = 2

class DisTestBase(unittest.TestCase):
"Common utilities for DisTests and TestDisTraceback"
Expand Down