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

Annotate Symbol#to_s as leaf #9769

Merged
merged 1 commit into from Jan 31, 2024
Merged

Annotate Symbol#to_s as leaf #9769

merged 1 commit into from Jan 31, 2024

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Jan 30, 2024

A leaf annotation allows the interpreter and YJIT to call the method without pushing a frame.

It seems to speed up railsbench a little:

before: ruby 3.4.0dev (2024-01-30T19:59:53Z master c1f8d974a8) +YJIT [x86_64-linux]
after: ruby 3.4.0dev (2024-01-30T21:33:27Z symbol-to-s b49e185cb6) +YJIT [x86_64-linux]

----------  -----------  ----------  ----------  ----------  -------------  ------------
bench       before (ms)  stddev (%)  after (ms)  stddev (%)  after 1st itr  before/after
railsbench  2473.4       0.9         2455.6      0.6         0.99           1.01
----------  -----------  ----------  ----------  ----------  -------------  ------------

@k0kubun k0kubun marked this pull request as ready for review January 30, 2024 22:43
@k0kubun k0kubun requested a review from a team January 30, 2024 22:43
@maximecb maximecb merged commit 51753ec into ruby:master Jan 31, 2024
99 checks passed
@k0kubun k0kubun deleted the symbol-to-s branch March 11, 2024 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants