Midi12/fnv

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

shyndman opened this issue · 2 comments

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?

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.

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.