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

List of YJIT experiments and takeaways #497

Open
maximecb opened this issue Feb 22, 2023 · 0 comments
Open

List of YJIT experiments and takeaways #497

maximecb opened this issue Feb 22, 2023 · 0 comments

Comments

@maximecb
Copy link

maximecb commented Feb 22, 2023

In order to guide the development of YJIT, we perform a fair number of small experiments. However, we do so many of these, that it becomes hard to remember them all and keep track of all the documents, issues, etc. I'm opening this issue so we can gather keep track of the experiments we perform, the data we gather, and the takeaways we come to.

I'm going to pin this issue. You should be able to edit this comment to add to the list, or comment on the issue. Please include links to relevant documents, issues or PRs, and try to summarize takeaways in one or two sentences :)

Method calls

Call frequency and call types in yjit-bench

Shopify/yjit-bench#168

Takeaway: C method calls are the most popular. Block calls don't happen that often compared to them.

Reducing interp_return by rewriting Array#each in Ruby

#493 (comment)

Takeaway: It reduces interp_return by 3%. But it doesn't give a speedup overall.

JIT ABI to return multiple values

ruby#7543

Takeaway: No impact on railsbench, liquid-render speeds up by 1~2%. Not worth the complexity.

Memory usage

Memory used by YJIT Rust

#484

Takeaway: Reducing the number of Blocks and Branches is the key. Context uses only 10~15% of all memory usage.

Distribution of Context objects on railsbench

https://gist.github.com/k0kubun/c1a5854e011db90d7e6efd73a6eda3b3

Takeaway: Contexts are currently very sparse, most types are unknown. There's definitely room for memory savings.

Context memory saving experiments

Takeaway: Deduplicating Context with HashSet<Rc<Context>> works the best. But it might change as Context changes.

@maximecb maximecb pinned this issue Feb 22, 2023
@maximecb maximecb unpinned this issue Jul 15, 2024
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

No branches or pull requests

1 participant