-
Notifications
You must be signed in to change notification settings - Fork 23
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
Suggestion: Add #[inline(always)]
to most derives
#115
Comments
I know that |
I mean the implementations of traits nutype generates should have an |
I interpret that as "inline functions of traits that nutype generates". (please correct me if that interpretation is wrong). As far as I know Rust is good at determining what should be inlined automatically. Could you provide a measuarable example, where inlining of trait methods/functions generated by nutype makes a noticeable difference in performance? |
Ok, I checked the implementation generated by |
@Sympatron Hi, are you still planning to open a PR for this? |
Since I discovered a few other problems with |
@Sympatron Thanks for the update, no problem at all. |
It was mostly not very |
@Sympatron Hi, I just published
|
Since most derives don't really contain any logic, it would be best to mark then as
#[inline]
or#[inline(always)]
to allow them to be easily optimized away across crates and make them zero cost abstractions.If you are interested I could work on a PR.
The text was updated successfully, but these errors were encountered: