Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sverker
Copy link
Contributor

@sverker sverker commented Apr 23, 2025

Remove use of struct ErtsDistExternal which contains a large atom cache table (64kb). The atom cache is not even used by binary_to_term and just consumes native stack space. With compiler option -ftrivial-auto-var-init=zero it gets really bad as it zeroes all those 64kb for each call.

@sverker sverker added team:VM Assigned to OTP team VM enhancement labels Apr 23, 2025
@sverker sverker self-assigned this Apr 23, 2025
@sverker sverker changed the title Optimize binary_term Optimize binary_to_term Apr 23, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Apr 23, 2025

CT Test Results

    3 files    141 suites   49m 40s ⏱️
1 618 tests 1 562 ✅ 56 💤 0 ❌
2 339 runs  2 263 ✅ 76 💤 0 ❌

Results for commit c8cd321.

♻️ 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

@sverker sverker added the testing currently being tested, tag is used by OTP internal CI label Apr 23, 2025
@sverker sverker removed the testing currently being tested, tag is used by OTP internal CI label Apr 24, 2025
@sverker sverker force-pushed the sverker/28/erts/optimize-binary_to_term branch from 0cc110d to c8cd321 Compare April 24, 2025 18:40
@sverker sverker added the testing currently being tested, tag is used by OTP internal CI label Apr 24, 2025
@sverker sverker requested a review from rickard-green April 29, 2025 13:30
@sverker
Copy link
Contributor Author

sverker commented Apr 29, 2025

Ticket: OTP-19618

rickard-green
rickard-green previously approved these changes Apr 30, 2025
DistEntry *dep;
ErtsDistExternalData *data;
Uint32 flags;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Struct ErtsDistExternal contains large atom cache table (64kb)
which is not used by binary_to_term and just consumes stack space...

..and CPU if passing compile option -ftrivial-auto-var-init
@sverker sverker force-pushed the sverker/28/erts/optimize-binary_to_term branch from c8cd321 to 753b6e9 Compare April 30, 2025 12:28
@sverker sverker requested a review from garazdawi April 30, 2025 12:30
@sverker sverker merged commit 1bce410 into erlang:master Apr 30, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement 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.

3 participants