Skip to content

Conversation

DavisVaughan
Copy link
Member

@DavisVaughan DavisVaughan commented Sep 23, 2025

r_pairlist_find() was showing up in my Instruments profiles as not being inlined. It is used in some of the deepest layers of vctrs via r_dim() and r_class() through the following:

  • r_dim()
  • calls r_attrib_get()
  • calls r_pairlist_get()
  • calls r_pairlist_find()

r_dim() itself is used on every iteration of vec_size_common() when computing the vec_size() of an object.

It's definitely a simple enough loop that we can inline it, and after inlining it does disappear from the Instruments profile

@DavisVaughan DavisVaughan merged commit b19eba9 into main Sep 24, 2025
13 checks passed
@DavisVaughan DavisVaughan deleted the feature/inline-pairlist-find branch September 24, 2025 11:26
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