Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Optimizing for code size by default may hurt performance severely #27

Description

@alexcrichton

A topic that recently came up in #wg-wasm on Discord was that a wasm-pack project was performance much more slowly than a raw rustc-generated wasm file. It turned out to be related to opt-level = 's' in Cargo.toml, causing a nearly 3x (!) slowdown compared to -C opt-level=3 (the default).

I'm not sure how often this comes up in the wild though. Unfortunately there's not really a silver bullet here :(. I figured it'd be good to catalog though!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions