-
Notifications
You must be signed in to change notification settings - Fork 193
Rewrite inlining pass #1935
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
base: master
Are you sure you want to change the base?
Rewrite inlining pass #1935
Conversation
840420d
to
7b64a79
Compare
79446f9
to
ba1a622
Compare
b62b39e
to
5cb6652
Compare
I've pushed a fixup to the testsuite. |
We need a changelog entry |
I'm not certain I read the benchmark correctly. |
Maybe we can wait for #1962 to get better measurements. |
We don't have the latest benchmark. With this PR, we seem to double the time spent in inline. We can probably live with that. |
10a1ba8
to
6aaf9ad
Compare
It could be an issue with node 24. |
The test pass a lazy list to a function. This value is unfolded into something pretty large. The function is no longer inlined (we avoid inlining functions containing loops at toplevel since we expect that the toplevel code will not get optimized). Since node retains function parameters, the value is not garbage-collected and node eventually runs out of memory. |
I need to go through this code again and add some comments. |
Downgrading to node 23 fixes the CI |
There is a large increase for maxresident bewteen node 23 and node 24
node 24
|
Apologies for the delay; I didn't see this thread for a while. We should have some test and benchmark results ready for you next week. |
out of curiosity, what was the osx / node-24 issue? consuming too much memory? |
Many improvements landed on master in the past few days. It would be nice to test both base and tip of the PR so we can understand the impact of the PR alone |
1e96ca7
to
29f7ef3
Compare
|
Right, the aggressive inlining of functors does not really seem to result into any runtime improvement with js_of_ocaml. So it is not enabled only with wasm_of_ocaml. |
- We are a lot more aggressive at inlining functor-like functions in wasm_of_ocaml, since this may enable further optimizations - We are more cautious at inlining nested functions, since this can result in memory leaks - We inline a larger class of small functions
No description provided.