Skip to content

Massive memory growth for -O3, -O4, -Os and -Oz #7644

Open
@Jacalz

Description

@Jacalz

Hi. I am planning on applying wasm-opt to my Go project as part of Jacalz/hegelmote#30. The Go WASM files are generally quite big and our toolkit is not super optimised for WASM yet so I wanted to optimise it. As I was interested in seeing which level made the most sense, I aimed to run all of the levels to see how long they take and how they affect the binary size. What I unfortunately found out was that O1 and O2 were the only ones that were usable as -O3, -O4, -Os and -Oz all seem to use memory exponentially until all 32 GB are full. I have attached the file below if you wish to try and reproduce it.

Results:

  • Baseline: 37.3 MB
  • O1: 35.7 MB, 29.85 s
  • O2: 35.7 MB, 32.78 secs
  • O3: DNF
  • O4: DNF
  • Os: DNF
  • Oz: DNF

Running:

wasm-opt Hegelmote.wasm --enable-bulk-memory-opt -O3 -o O3.wasm

Potentially related to #3646.

Reference file: hegelmote-wasm.zip

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