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

Weird usage of #[inline] and #[inline(always)]. #5515

Open
suprohub opened this issue Dec 25, 2024 · 2 comments
Open

Weird usage of #[inline] and #[inline(always)]. #5515

suprohub opened this issue Dec 25, 2024 · 2 comments
Labels
bug Something is broken

Comments

@suprohub
Copy link

In some crates like emath, we can see what some small functions are #[inline] and some #[inline(always)]. Why we cant make all small functions #[inline(always)]?? In some places in code #[inline(always)] may be better what #[inline]. Can anyone make big code review for all crates and specify inline correctly, or tell why in some places where one line of code we use #[inline] instead of #[inline(always)]?

@suprohub suprohub added the bug Something is broken label Dec 25, 2024
@suprohub
Copy link
Author

Hello, we tried to solve the issue.

This is what we did:

Reviewed and updated inline attributes for small functions in the emath crate, changing some #[inline] to #[inline(always)] where appropriate to potentially improve performance.

You can review changes in this commit: jacks-sam1010@d346c34.

[!CAUTION]
Disclaimer: The concept of solution was created by AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, you should use this code as an inspiration only.


Latta AI seeks to solve problems in open source projects as part of its mission to support developers around the world. Learn more about our mission at https://latta.ai/ourmission . If you no longer want Latta AI to attempt solving issues on your repository, you can block this account.

Haha, stuid ai bruh, why yoy remove brackets??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants
@suprohub and others