There isn't a good solution for that currently. Browsers decided to stop supporting asm.js memory growth, so a 2x or so slowdown, as you see here, is expected.
The only option is to not use memory growth, if that is possible for your codebase, that is, if you know the limit of needed memory (maybe 256MB is enough?). Otherwise, this will be fixed eventually by WebAssembly, which will have memory growth at full speed. On Thu, Feb 9, 2017 at 11:22 PM, Ming Zhao <[email protected]> wrote: > hi, > I met a serious problem.Compiled (emcc v1.37.0) my program, using > ALLOW_MEMORY_GROWTH=0|1 in chrome 55 running time. > ALLOW_MEMORY_GROWTH = 0: 6 s > ALLOW_MEMORY_GROWTH = 1: 12 s > The complete compile command is : > emcc -Oz --llvm-lto 0 --memory-init-file 0 -s TOTAL_MEMORY=134217728 -s > ALLOW_MEMORY_GROWTH=1 -s DISABLE_EXCEPTION_CATCHING=2 -s NO_EXIT_RUNTIME=1 > -s PRECISE_F32=1 ...... > Because ALLOW_MEMORY_GROWTH=0, there is only 128MB of memory, when request > more than 128MB, mistakes will happen, so i need to use > ALLOW_MEMORY_GROWTH=1. > In the case of using ALLOW_MEMORY_GROWTH=1, I tried some other compiler > flags, but time is about 12s. > I see ALLOW_MEMORY_GROWTH=0|1 in both cases, the differences of function > of EnlargeMemory in the generated js file, and "use asm" and "almost asm" > differences, also refer to the related information, know the growth memory > on chrome support with problems. > Please is there any way I can make the running time of > ALLOW_MEMORY_GROWTH=1 and ALLOW_MEMORY_GROWTH=0? any other build flags? > > Other method? > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
