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-127617: Trace through __init__ in CALL_ALLOC_AND_ENTER_INIT#127618

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

Open
Fidget-Spinner wants to merge7 commits intopython:main
base:main
Choose a base branch
Loading
fromFidget-Spinner:trace_thru_init

Conversation

Fidget-Spinner
Copy link
Member

@Fidget-SpinnerFidget-Spinner commentedDec 4, 2024
edited by bedevere-appbot
Loading

Benchmark script:

# import timeclass Vector:    def __init__(self, initx, inity, initz):        self.x = initxdef func(x):    for i in range(10000000):        y = Vector(1, 2, 3)def main():    import time    start_time = time.perf_counter()    import _testinternalcapi    opt = _testinternalcapi.new_uop_optimizer()    _testinternalcapi.set_optimizer(opt)    func(1)    # func(2.0)    _testinternalcapi.set_optimizer(None)    end = time.perf_counter()    print(f"Time elapsed {end - start_time}")main()# func()

Result on main:
Time elapsed 1.5296352980003576

Result here:
Time elapsed 1.432000498999514

Shows the JIT is working I guess :).

@Fidget-Spinner
Copy link
MemberAuthor

Note: this actually performs worse onbm_raytrace.py due to its polymorphism I think. So I would like to hold off merging it bar proper perf analysis/results.

@python-cla-bot
Copy link

python-cla-botbot commentedApr 18, 2025
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

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

@kumaraditya303kumaraditya303kumaraditya303 left review comments

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

@brandtbucherbrandtbucherAwaiting requested review from brandtbucher

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Fidget-Spinner@kumaraditya303

[8]ページ先頭

©2009-2025 Movatter.jp