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

Add a prefetch buffer in front of the GC stack #49430

Closed
wants to merge 4 commits into from

Conversation

gbaraldi
Copy link
Member

@gbaraldi gbaraldi commented Apr 19, 2023

This is a prototype implementation, it shows decent speedups on Intel and AMD machines, but on the M1 it's less clear, the sweep prefetching seems to be a win everywhere.

It seems the M1 hardware prefetch is already smart enough so it does it by default.

@gbaraldi gbaraldi requested a review from d-netto April 19, 2023 19:51
if (push_into_queue) {
__builtin_prefetch(jl_astaggedvalue(new_obj), 1, 3);
__builtin_prefetch(&((jl_value_t**)new_obj)[7], 1, 3);
__builtin_prefetch(&((jl_value_t**)new_obj)[16], 1, 3);
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

128 bytes after the header seems a bit unlikely to need? Is the assumption that gets the full cache line around it?

@gbaraldi gbaraldi closed this May 2, 2023
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.

None yet

2 participants