Skip to content

perf: reduce scope of ptr in retain_mut - #563

Merged
alejandro-vaz merged 1 commit into
servo:v2from
fereidani:v2_retain_2
Sep 2, 2026
Merged

perf: reduce scope of ptr in retain_mut#563
alejandro-vaz merged 1 commit into
servo:v2from
fereidani:v2_retain_2

Conversation

@fereidani

Copy link
Copy Markdown
Contributor

I'm surprised but this improves performance and reduces count of assembly instructions.

@alejandro-vaz alejandro-vaz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

it makes sense I guess

instead of fetching the pointer in each iteration it only does so once

@alejandro-vaz
alejandro-vaz added this pull request to the merge queue Sep 2, 2026
Merged via the queue into servo:v2 with commit fc5cb71 Sep 2, 2026
5 checks passed
@fereidani

Copy link
Copy Markdown
Contributor Author

I assumed before that compiler can see that pointer is not changing by itself.

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