Re: wasm-opt is extremely slow

2022-11-21 Thread 'Thomas Lively' via emscripten-discuss
That's really slow! Are you using the release binaries or building wasm-opt
yourself? If you're building it yourself, are you sure you're building
wasm-opt in release mode?

Can you run wasm-opt with environment variable BINARYEN_PASS_DEBUG=1 and
share the results? That will show which optimization passes are taking the
most time.

On Mon, Nov 21, 2022 at 1:19 PM Александр Гурьянов 
wrote:

> Hi, I added dosbox-x as backend for js-dos it's size is ~12Mb, wasm-opt
> requires 10-12 min to optimize it (-Oz). Do you have any advice how to
> speed up it? If I build with -O0/1 I have following error in chrome:
>
>
> ‣
> 
>
> CompileError: WebAssembly.compile(): Compiling function 
> #6485:"CPU_Core_Normal_Run()" failed: local count too large @+4790225
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/CAKOm%3DVH02jeZ70pHAe%2BvTL26ScOato8r7b_UBW_V34mJvGwt_Q%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAJZD_EXSn0PmY3GZE4SZAHczJ8U6SekGRB-D5kDfS7c4L9OcKQ%40mail.gmail.com.


Re: wasm-opt is extremely slow

2022-11-21 Thread Alon Zakai
First thing, I would try -O2 and -Os. They can be much faster than -O3 and
-Oz.

Otherwise, 10-12 minutes sounds extreme even for 12MB, so this is likely
hitting an unknown bad case. If you can run a system profiler on it that
might show something useful. You can also run with BINARYEN_PASS_DEBUG=1 in
the env, which will list times of passes - perhaps one particular pass will
be slowest.

On Mon, Nov 21, 2022 at 11:19 AM Александр Гурьянов 
wrote:

> Hi, I added dosbox-x as backend for js-dos it's size is ~12Mb, wasm-opt
> requires 10-12 min to optimize it (-Oz). Do you have any advice how to
> speed up it? If I build with -O0/1 I have following error in chrome:
>
>
> ‣
> 
>
> CompileError: WebAssembly.compile(): Compiling function 
> #6485:"CPU_Core_Normal_Run()" failed: local count too large @+4790225
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/CAKOm%3DVH02jeZ70pHAe%2BvTL26ScOato8r7b_UBW_V34mJvGwt_Q%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpRWo88FyDPWU3eF%3DH_ze8owRu2EgNpptYvKmFD6FHgoVg%40mail.gmail.com.


wasm-opt is extremely slow

2022-11-21 Thread Александр Гурьянов
Hi, I added dosbox-x as backend for js-dos it's size is ~12Mb, wasm-opt
requires 10-12 min to optimize it (-Oz). Do you have any advice how to
speed up it? If I build with -O0/1 I have following error in chrome:


‣


CompileError: WebAssembly.compile(): Compiling function
#6485:"CPU_Core_Normal_Run()" failed: local count too large @+4790225

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAKOm%3DVH02jeZ70pHAe%2BvTL26ScOato8r7b_UBW_V34mJvGwt_Q%40mail.gmail.com.