Skip to content

math.bits: optimizations, tweaks to doc comments#27300

Closed
JalonSolov wants to merge 2 commits into
vlang:masterfrom
JalonSolov:better_bits
Closed

math.bits: optimizations, tweaks to doc comments#27300
JalonSolov wants to merge 2 commits into
vlang:masterfrom
JalonSolov:better_bits

Conversation

@JalonSolov
Copy link
Copy Markdown
Collaborator

  • optimized trailing_zeros_* routines to use existing ntz_8_tab table
  • switched from parallel-bit-summing to calling ones_count_default
  • switched to direct byte-lane swaps in reverse_bytes_* routines
  • added a fast path to div_64_default if hi == 0
  • removed need for de Bruijn/popcount mask constants at top
  • added direct_array_access attribute where table paths used

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 201dfabf2a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread vlib/math/bits/bits.arm64.v Outdated
Comment thread vlib/math/bits/bits_test.v Outdated
@JalonSolov JalonSolov closed this May 31, 2026
@JalonSolov JalonSolov deleted the better_bits branch May 31, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant