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

Optimize for YJIT by using while loops #52

Merged
merged 3 commits into from
Dec 14, 2023
Merged

Optimize for YJIT by using while loops #52

merged 3 commits into from
Dec 14, 2023

Conversation

martijn
Copy link
Owner

@martijn martijn commented Dec 14, 2023

The code introduced in this change is not idiomatic ruby but improves performance in Ruby 3.3-rc1 and without YJIT enabled.

With YJIT the performance gain is about 5%, without YJIT it's 2%. YJIT is generally 15% faster in the basic Xsv benchmark.

For more information, see the code optimization tips in the YJIT docs

The code introduced in this change is not idiomatic ruby but improves performance in Ruby 3.3-rc1 and without YJIT enabled.

With YJIT the performance gain is about 5%, without YJIT it's 2%. YJIT is generally 15% faster in the basic Xsv benchmark.

For more information, see the code optimization tips in the [YJIT docs](https://github.com/ruby/ruby/blob/master/doc/yjit/yjit.md#code-optimization-tips)
I'm tired of this breaking constantly
@martijn martijn merged commit e173c4e into main Dec 14, 2023
7 checks passed
@shkm
Copy link
Collaborator

shkm commented Dec 14, 2023

Damn, xsv was so idiomatic before.

@martijn martijn deleted the yjit-optimization branch May 17, 2024 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants