Skip to content

Merge dev#1

Merged
phughesmcr merged 7 commits into
mainfrom
dev
May 4, 2026
Merged

Merge dev#1
phughesmcr merged 7 commits into
mainfrom
dev

Conversation

@phughesmcr
Copy link
Copy Markdown
Owner

Summary

Merge dev into main with a broad BooleanArray performance/API update focused on reducing allocation pressure in hot paths, improving typed-array
interoperability, and tightening release validation.

Changes

  • Added reusable/preallocated APIs:
    • cloneInto
    • copyFromArray
    • copyFromObjects
    • setFromObjects
    • copyFromUint32Array / copyToUint32Array
    • copyFromUint8Array / copyToUint8Array
    • getUint8Into
  • Added zero-allocation operation variants:
    • andInto, orInto, xorInto, differenceInto
    • nandInto, norInto, xnorInto, notInto
  • Added allocation-free relationship and cursor APIs:
    • intersects
    • containsAll
    • nextTruthyIndex
    • nextFalsyIndex
  • Expanded static and module exports for constructors, constants, validation helpers, and internal utilities.
  • Updated constructors to accept broader ArrayLike inputs, including typed numeric index streams and positional Uint8Array masks.
  • Improved validation so bulk mutation methods validate inputs before mutating destinations.
  • Added GC allocation benchmark scripts and Deno tasks for local and optional external package comparisons.
  • Updated CI/publish workflow to run Deno checks, docs linting, dry-run publish validation, and deno publish.
  • Expanded README coverage for the new APIs, allocation benchmark workflow, and performance-oriented usage patterns.
  • Added and expanded tests for new APIs, typed-array interop, validation behavior, cursor scanning, relationship queries, and preallocated bitwise
    operations.

- Added `.vscode/**`, `.cursor/**`, and `.claude/**` to the list of excluded directories in the publish configuration, ensuring a cleaner package output.
- Introduced new utility functions in `mod.ts` for better access to bitwise operations and validation methods, including `fromArray`, `fromObjects`, and `fromUint32Array`.
- Updated `README.md` to reflect changes in method names, replacing `getTruthyCount` with `getCount`, and improved examples for clarity.
- Added constants and validation utilities in `constants.ts` and `validation.ts` to streamline the codebase and enhance maintainability.
- Updated benchmarks in `BooleanArray.bench.ts` to align with new method signatures and improve performance testing accuracy.
- Refined `.gitignore` to exclude coverage reports, ensuring cleaner repository management.
- Introduced a new benchmark script `gc_allocations.ts` to measure garbage collection allocation pressure for various `BooleanArray` APIs.
- Updated `deno.json` to include a new command `bench:allocations` for running the benchmark.
- Enhanced `mod.ts` by exporting new utility functions `getLSBPosition` and `popcount` for better access to bitwise operations.
- Refactored `BooleanArray` methods to optimize memory usage during operations, ensuring efficient performance in tight loops.
…benchmarks

- Added `nextTruthyIndex`, `nextFalsyIndex`, and `nextIndexOf` methods to `BooleanArray` for efficient cursor-style scanning without allocations.
- Enhanced `README.md` to document the new cursor methods and their usage.
- Introduced benchmarks for the new cursor methods in `gc_allocations.ts` to measure performance under various scenarios.
- Expanded tests in `boolean-array.test.ts` to validate the behavior of the new cursor APIs, ensuring correct functionality and range handling.
…nchmarks

- Changed the target library version in `deno.json` from `es2022` to `es2024`.
- Enhanced `mod.ts` by adding new utility functions for `fromUint8Array` and additional bitwise operations, improving the `BooleanArray` API.
- Updated `README.md` to reflect new methods and usage examples, including bulk operations and zero-allocation methods.
- Introduced new benchmark tasks in `deno.json` for measuring GC allocation pressure and comparing with external npm packages.
- Added a new benchmark script `external_gc_allocations.ts` to evaluate memory usage against competitor libraries.
- Updated `mod.ts` to include additional constants and utility functions for better access to bitwise operations, including `BITS_PER_INT`, `MAX_SAFE_SIZE`, and `MAX_UINT32`.
- Refactored the `BooleanArray` class to expose new static methods for size and value validation, chunk calculations, and array creation from various input types.
- Improved the CI workflow in `publish.yml` by adding steps for Deno setup, linting documentation, and verifying package publication.
- Updated `constants.ts` to ensure type consistency for `ALL_BITS_TRUE` and maintain clarity in the codebase.
@phughesmcr phughesmcr merged commit 95886ab into main May 4, 2026
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