Skip to content

Optimise buffer using bitwise AND - #2

Merged
iotamale merged 3 commits into
mainfrom
1-optimise-buffer-using-bitwise-and
Sep 2, 2026
Merged

iotamale merged 3 commits into
mainfrom
1-optimise-buffer-using-bitwise-and

Conversation

@iotamale

@iotamale iotamale commented Sep 2, 2026

Copy link
Copy Markdown
Owner
  • Force power-of-2 capacity to allow bitwise AND pointer wrapping
  • Calculate size dynamically (tail - head) instead of using currSize
  • Add auto-flattening to safely prevent MAX_SAFE_INTEGER overflows
  • Expose getCapacity() method

@iotamale iotamale linked an issue Sep 2, 2026 that may be closed by this pull request
@iotamale
iotamale force-pushed the 1-optimise-buffer-using-bitwise-and branch from ac115f6 to b1012f1 Compare September 2, 2026 16:02
@iotamale iotamale changed the title optimise buffer using bitwise and Optimise buffer using bitwise AND Sep 2, 2026
@iotamale
iotamale merged commit b566a20 into main Sep 2, 2026
2 checks passed
@iotamale
iotamale deleted the 1-optimise-buffer-using-bitwise-and branch September 2, 2026 16:26
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.

Optimise buffer using bitwise AND

1 participant