Skip to content

Wasm in demo page is unoptimized #24

@kripken

Description

@kripken

Running wasm-opt -O on it, it becomes less than half the size, 723,715 bytes instead of 1,576,113.

This may not just affect size, as wasm-opt --metrics -O --metrics reports this in the diff:

 [vars]         : 10448     -79887

which means the number of local variables goes from 90335 to 10448, almost 9x less. Wasm VMs may not be able to run unoptimized code with excessively many locals at full speed (they may end up stuck in baseline tiers).

(Aside from the Binaryen optimizer, LLVM opts should also be run, but I can't tell if they were or not from the binary.)

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