-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[wasm] Optimize out references to a bunch of BCL methods during JS interop startup #101217
Conversation
Tagging subscribers to 'arch-wasm': @lewing |
Is there a reason not to do the parsing in js or unmanaged? |
We could move it all there, yeah. It's just more invasive. Happy to do it. |
Took some measurements, and this reduces the % of total startup JS samples underneath |
I think it's next logical step 🤣 See c34474e now seriously, i'm OK with moving it back, it seems we only needed to parse it on C# side in order to format that |
Remove interpolated string from jsinterop startup
6b97da5
to
1ae3734
Compare
…terop startup (dotnet#101217) During startup for a simple wasm browser app, by my testing the interpreter has to generate code for ~870 methods. This PR reduces it to ~750. Most of the methods removed are SIMD-related, i.e. vector infrastructure or vectorized string algorithms. The interpolated string also pulls in a ton of threading and synchronization stuff due to renting from a pool. In the future we could move all of this string logic into C or JS to avoid involving managed code at all, since the resulting string is not used by C#.
During startup for a simple wasm browser app, by my testing the interpreter has to generate code for ~870 methods. This PR reduces it to ~750.
Most of the methods removed are SIMD-related, i.e. vector infrastructure or vectorized string algorithms. The interpolated string also pulls in a ton of threading and synchronization stuff due to renting from a pool.