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

Consider adding @pragma('vm:prefer-inline') hints across the board #2

Open
shyndman opened this issue Apr 19, 2022 · 2 comments
Open

Comments

@shyndman
Copy link

Hello again,

I decided to try out hinting the compiler to inline the package's hash functions by using @pragma('vm:prefer-inline'), and it appears to have yielded a pretty substantial improvement in performance, at least in a Dart AOT build (VM build appears unaffected).

Would you be open to a PR?

@Midi12
Copy link
Owner

Midi12 commented Apr 19, 2022

Hello,

Thanks for opening this issue.

Would the @pragma('vm:prefer-inline') hint only inline code in the callee? I guess yes but I did not find any official documentation about this particular hint online.

@shyndman
Copy link
Author

Would the @pragma('vm:prefer-inline') hint only inline code in the callee?

Yup. If you're curious, here's the loop over the call sites, and the pragma check. They meet in the middle somewhere. :)

I guess yes but I did not find any official documentation about this particular hint online.

Me either. Ripe for misuse, I suspect.

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

2 participants