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

erts: Reintroduce literal fun optimization #6963

Conversation

jhogberg
Copy link
Contributor

@jhogberg jhogberg commented Mar 2, 2023

The optimization that turned make_fun2/3 instructions of funs lacking an environment into literals was lost during the pre-JIT refactoring of the loader, as creation of fun entries was now (rightly) deferred until the very last stages of module loading.

This commit restores that optimization by creating placeholders in the form of external funs, which are then converted to local funs during the last stages of module loading.

@jhogberg jhogberg added team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI labels Mar 2, 2023
@jhogberg jhogberg requested a review from bjorng March 2, 2023 16:26
@jhogberg jhogberg self-assigned this Mar 2, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2023

CT Test Results

       3 files     133 suites   50m 2s ⏱️
1 545 tests 1 494 ✔️ 51 💤 0
1 962 runs  1 892 ✔️ 70 💤 0

Results for commit 05cd4bc.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

The optimization that turned make_fun2/3 instructions of funs
lacking an environment into literals was lost during the pre-JIT
refactoring of the loader, as creation of fun entries was now
(rightly) deferred until the very last stages of module
loading.

This commit restores that optimization by creating placeholders
in the form of external funs, which are then converted to local
funs during the last stages of module loading.
@jhogberg jhogberg force-pushed the john/erts/reintroduce-literal-lambdas/OTP-18498 branch from 70f53fd to 7532e1d Compare March 2, 2023 21:39
@jhogberg jhogberg force-pushed the john/erts/reintroduce-literal-lambdas/OTP-18498 branch 2 times, most recently from ad191d1 to 69fff7c Compare March 3, 2023 14:47
@jhogberg jhogberg force-pushed the john/erts/reintroduce-literal-lambdas/OTP-18498 branch from 69fff7c to 05cd4bc Compare March 3, 2023 15:26
@jhogberg jhogberg merged commit fa3fbc3 into erlang:master Mar 6, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants