Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-145230: Update lockbench.py and benchmark_locks API#145271

Closed
gourijain029-del wants to merge 1 commit intopython:mainfrom
gourijain029-del:improve-lockbench
Closed

gh-145230: Update lockbench.py and benchmark_locks API#145271
gourijain029-del wants to merge 1 commit intopython:mainfrom
gourijain029-del:improve-lockbench

Conversation

@gourijain029-del
Copy link

@gourijain029-delgourijain029-del commentedFeb 26, 2026
edited by bedevere-appbot
Loading

PR Description
Updates

lockbench.py
and the internal

benchmark_locks
API to support more realistic PyMutex benchmarking.

Key Changes:

New Metrics: Added --work-outside, --num-locks, and --total-iters to simulate varying contention levels and measure fairness.
Redundancy: Removed PyThread_type_lock benchmarking as it now uses PyMutex.
CLI: Switched to argparse and made the number of threads configurable.
Efficiency: Added cache-line padding to mutex states in C to prevent false sharing during multi-lock tests.

- Remove PyThread_type_lock benchmark as it now uses PyMutex.\n- Add --work-outside to adjust work outside critical sections.\n- Add --num-locks to support benchmarking multiple independent locks.\n- Make number of threads configurable.\n- Add --total-iters for fixed iteration benchmarks.
@bedevere-app
Copy link

Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply theskip news label instead.

@colesbury
Copy link
Contributor

Thank you, but I already have a PR that makes the changes I described.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@gourijain029-del@colesbury

[8]ページ先頭

©2009-2026 Movatter.jp