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-103092: isolate _lsprof#115130

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
aisk wants to merge5 commits intopython:mainfromaisk:isolate-lsprof
Closed

Conversation

aisk
Copy link
Member

@aiskaisk commentedFeb 7, 2024
edited by bedevere-appbot
Loading

The main change is moving the static variablesrandom_value andrandom_stream inrotatingtree.c to a struct and storing it in the module's state.

Other changes are to pass the struct from the module's state.

@erlend-aasland
Copy link
Contributor

Thanks; can you split out the Argument Clinic adaption and contribute that as a separate PR?

@aisk
Copy link
MemberAuthor

aisk commentedFeb 10, 2024
edited
Loading

Sure, see#115242 .

@aiskaisk marked this pull request as draftFebruary 10, 2024 12:17
@aisk
Copy link
MemberAuthor

Hi@erlend-aasland, I have a new thought. This change is just to isolate these two static variables:

staticunsignedintrandom_value=1;
staticunsignedintrandom_stream=0;

But as they are the state of a pseudo-random generator, they can be shared between interpreters under a lock. For single interpreter usage, there is no noticeable performance decrease. And this work can be done easily.

I have no idea if this approach is acceptable, or whether we should continue with the previous work. If it does, I can do some benchmarking to see if there is a performance decrease in multiple isolated interpreters usage.

erlend-aasland reacted with thumbs up emoji

@erlend-aasland
Copy link
Contributor

Sounds reasonable. Go ahead!

@erlend-aasland
Copy link
Contributor

Superseded by#115301

@aiskaisk deleted the isolate-lsprof branchMarch 1, 2024 05:24
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently is a code owner

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@aisk@erlend-aasland

[8]ページ先頭

©2009-2025 Movatter.jp