Skip to content

[Question] Usage of the attribute MethodImpl + Options.AggressiveInlining #2

@eJJonatah

Description

@eJJonatah

In this source file you made the usage of the mentioned attribute. It always gets me entrigued. How to know or infer the correct good cases to make the usage of this attribute? Other places that i've searched for generally says something around 'only use it when you know what you are doing'. In the documentation, its explained what does it do and an advice about not using it uless necessary. But the question that remais is

How to know the right situations to use MethodImpl attribute?

Is that a way to infer the most correct places where the methods should be inlined? For example,
I attempt inlining when i'm reducing function sizes and creating other private methods with the only
purpose of reducing the origin size (SOLID), there inst a real reason to have this specific method sepparated, therefore
i ask the compiler to inline them. Would that be a valid use case? How to identify others?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions