Skip to content

Research reducing monomorphization bloat by delegating to non-generic implementations #910

@cmichi

Description

@cmichi

These two blog posts describe techniques for reducing monomorphization bloat by having only a thin generic interface layer, which immediately delegates to a non-generic implementation:

https://llogiq.github.io/2019/05/18/momo.html

https://matklad.github.io/2021/09/04/fast-rust-builds.html

The Hackernews comments also contain some good ideas: https://news.ycombinator.com/item?id=28425095.

There is also the momo crate, which implements a macro for this technique.

We should look into if this is applicable to ink!.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ink_storage[ink_storage] Work ItemB-enhancementNew feature or requestB-researchResearch task that has open questions that need to be resolved.C-discussionAn issue for discussion for a given topic.P-highHigh priority issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions