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

Slightly optimize bit syntax construction #9225

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bjorng
Copy link
Contributor

@bjorng bjorng commented Dec 20, 2024

See the individual commit messages for details.

Having the definition in erl_bits.h allows us to use it from
beam_jit_common.cpp.
@bjorng bjorng added team:VM Assigned to OTP team VM enhancement testing currently being tested, tag is used by OTP internal CI labels Dec 20, 2024
@bjorng bjorng requested a review from jhogberg December 20, 2024 04:53
@bjorng bjorng self-assigned this Dec 20, 2024
Copy link
Contributor

github-actions bot commented Dec 20, 2024

CT Test Results

    3 files    141 suites   48m 36s ⏱️
1 598 tests 1 549 ✅ 49 💤 0 ❌
2 307 runs  2 238 ✅ 69 💤 0 ❌

Results for commit aeb36f1.

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

jhogberg
jhogberg previously approved these changes Dec 20, 2024

/* This instruction is always preceded by a size calculation that
* guarantees that 'arg' is a bitstring. */
ASSERT(is_bitstring(arg));
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: this is already checked in ERTS_GET_BITSTRING.

Slightly optimize creation of binary segments when it's known
that units are compatible.
When accumulating a fixed-size integer, be sure to use the smallest
possible native instructions. Also simplify storing the first value
into the accumulator.
@bjorng bjorng force-pushed the bjorn/erts/opt-bit-syntax-construction branch from 67ff56c to aeb36f1 Compare December 20, 2024 12:16
@bjorng bjorng requested a review from jhogberg December 20, 2024 12:16
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.

2 participants