Skip to content

Un-inline Mapping.getCondensed and maybe other things as well #16

Description

@gene-pavlovsky

I've just noticed that a simple for (key in someMapping.keys()) ... generates over 2 kb of code.
The reason being that Mapping's getCondensed is declared as inline.

I've looked at List and it uses inline sparingly (even there, exists and count can be considered for un-inlining).
However in Mapping, basically every function is inlined, getCondensed seeming to me the most egregious abuse of inline.

Was there any benchmarking or real-world code profiling done on these data structures, to determine what deserves to be inlined, and what doesn't? If not, I propose to remove inline from everything over 1-3 lines of code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions