-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Performance drop since 2.0.2 release #13796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I recommend bisecting this, https://emscripten.org/docs/contributing/developers_guide.html#bisecting That should quickly find a much smaller range. |
Sorry for the slow response but i now understand what caused the change in performance. In emscripten this was #12010 and #11979 |
I think the issue here might be the use of @juj I think we had an agreed direction to cache the values of the table (but I can't seem to find the issue now) and I think I remember you had a PR for that? If not I can look into adding a cache for this. |
Thanks @juj, I commented there now. Looks close to ready to land to me. |
@kripken @juj thanks for looking a this. I just tested 2.020 with the changes from #13844 that still leaves all the invoke_ii etc. functions that call wasmTable.get directly and so this doesnt fix our performance problem. Replacing those with wbind seems to fix it though. I just hacked that into the js file to test. |
@juj Is there anything i can do to help get that PR approved/merged. The additional change that is needed for us to get our performance back is to replace the wasmTable.get in make_dynCall with wbind in tools/shared.py |
We recently tried to move to 2.0.15 and noticed a 10-20% increase in run time of our application, this also showed up in tests that are allocating memory. We traced this back to starting at 2.0.2.
The attached programme which i compile with
call em++ -s DISABLE_EXCEPTION_CATCHING=0 -s INITIAL_MEMORY=1024MB -s ASSERTIONS=0 -s DEMANGLE_SUPPORT=0 -O3 -DNDEBUG=1 test.cpp -o test.js
and the run with
node test.js
shows time for 2.0.1 to do the malloc's
Time difference = 5447635 msecs
and for 2.0.2
Time difference = 8133452 msecs
I have looked through the commits in emscripten between the 2 releases and don't understand which of them is causing this.
It doesn't matter if we turn exception handling on or off.
The text was updated successfully, but these errors were encountered: