Skip to content

perf: Use native symbol registration#427

Merged
shikokuchuo merged 2 commits intomainfrom
registration
Aug 13, 2025
Merged

perf: Use native symbol registration#427
shikokuchuo merged 2 commits intomainfrom
registration

Conversation

@shikokuchuo
Copy link
Member

@shikokuchuo shikokuchuo commented Aug 12, 2025

Closes #426. Free speed up for all calls into native code.

From Writing R Extensions: https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Registering-native-routines

This avoids the overhead of looking up an entry point each time it is used, and ensures that the entry point in the package is the one used (without a PACKAGE = "pkg" argument).

Similar changes in r-lib/later#187 and mlverse/torch#976.

@shikokuchuo shikokuchuo requested a review from schloerke August 12, 2025 18:31
Copy link
Collaborator

@schloerke schloerke left a comment

Choose a reason for hiding this comment

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

Thank you!

@schloerke
Copy link
Collaborator

Please add a NEWS entry before merging

@schloerke schloerke changed the title Use native symbol registration perf: Use native symbol registration Aug 13, 2025
@shikokuchuo shikokuchuo merged commit c8757a7 into main Aug 13, 2025
25 checks passed
@shikokuchuo shikokuchuo deleted the registration branch August 13, 2025 20:15
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.

Use native symbol registration

3 participants