Skip to content
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

Reduce One Caller Inline Max Size to 160 for high optimization levels #1923

Closed
wants to merge 1 commit into from

Conversation

MaxGraey
Copy link
Member

@MaxGraey MaxGraey commented Jun 24, 2021

Some engines like v8 avoid heavy (large) functions and simply skip optimization for them. To reduce this probability, I propose to slightly decrease the value of OneCallerInlineMaxSize from 200 to 160.

  • I've read the contributing guidelines

@dcodeIO
Copy link
Member

dcodeIO commented Jun 24, 2021

The PR over there mentions that this is a "short-term mitigation". Do you have a feel for how often we are emitting functions > 500kb with the current thresholds? Would it maybe make sense to add this limit to Binaryen instead, so it can stop inlining when it would reach that size of a function?

@MaxGraey
Copy link
Member Author

500 Kb is very big threshold. But in theory and I do not think that we even at the previous value could exceed it even in the case of some cascade effect. More granular (smaller) functions are good also because they speed up compilation/optimization of binaryen itself.

@MaxGraey
Copy link
Member Author

Would it maybe make sense to add this limit to Binaryen instead, so it can stop inlining when it would reach that size of a function?

@dcodeIO Alan already working on this: WebAssembly/binaryen#3959

@MaxGraey MaxGraey closed this Jul 3, 2021
@MaxGraey MaxGraey deleted the opt branch July 3, 2021 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants