Oh and another thing just popped into my mind (sorry for spamming ;) When trying emscripten directly on a Windows host I also noticed that clang was dramatically slow there than on OSX or Linux, and even slower than Visual Studio. I guess the way clang reads and writes data isn't a good match for NTFS. I got huge speedups by moving the compilation into a Linux VM running on the Windows host as described above (it's important that you don't compile from a shared directory, but copy the files first into the Linux filesystem).
Cheers, -Floh. Am Montag, 9. Januar 2017 14:27:06 UTC+1 schrieb Floh: > > PS: I guess I misread your reply, you're using a bytecode VM in the code, > not compiling in a VM (or may be you do in that case shared directory perf > might be the main problem). > > Anyway, I timed my own 110k emulator code base on OSX (mid-2014 MBP with > SSD, 2.8 GHz i5 CPU) > > - native compile, clang with ninja: 27.6 seconds > - emscripten compile with ninja: 48.21 seconds > > All in release-mode with -O3, the emscripten version also uses > link-time-code-generation (which increases linker time), the native version > doesn't use LTCG. But I think the main chunk goes into the emscripten > process of converting LLVM bitcode to asm.js. > > Hope this helps a bit to find the culprit for your slow compile times :) > -Floh. > > > Am Montag, 9. Januar 2017 14:13:32 UTC+1 schrieb Floh: >> >> * compiling takes a fairly long time if compared with native compilers, >>> such as MSVC or GCC. >>> >>> Note that if your compiling in a VM (as I think read below in one of >> your replies), and the source code is in a shared directory (shared with >> the host filesystem), then this will be *extremely slow* (at least in >> VirtualBox which I'm using). >> >> What I'm doing is to first rsync the source code into the local VM's >> filesystem, and than compile, preferably through ninja which shaves off a >> couple more seconds and automatically distributes work over available CPU >> cores. With this the entire compile including linking is easily faster than >> a native VStudio compile, but slower than a native clang compile because of >> emscripten's final code generation stage. YMMV of course (depending on how >> big your code base is). >> >> Cheers, >> -Floh. >> >> >> >> >> -- 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.
