WebAssembly / WebAssembly/binaryen

wasm-opt is 35x slower on windows compared to linux

Open
#7,705 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
8.6k
Forks
885
Avg merge
1d 19h
Merged PRs (30d)
69

Description

See the output produced by building a ~46MB wasm binary and ~47MB JSPI wasm binary using EMCC_DEBUG=2.

On linux:

profiler:DEBUG: block "wasm_opt" took 46.559 seconds

On windows:

profiler:DEBUG: block "wasm_opt" took 1565.294 seconds

Complete build log:

  1. windows compile_output.log

  2. linux compile_output.log

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 4.0.10 (b7dc6e5747465580df5984e723b9d1f10d8e804b)
Copyright (C) 2025 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

wasm-opt version 123 (version_123-168-g8c82b6884)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the attached Windows and Linux compile_output.log files and reproducing the ~46MB wasm build with EMCC_DEBUG=2 using emcc 4.0.10 and wasm-opt version 123. Trace the wasm_opt step to isolate the platform-specific slowdown; done means identifying the cause and validating comparable performance after the correction on both platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
compilers, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.