Releases: ProjectTorreyPines/AdaptiveArrayPools.jl
v0.2.0
What's New
Lazy Selective Rewind
@with_pool now defers per-type checkpoints until first acquire! and rewinds only the pools actually touched, instead of all 8 fixed-slot types. Up to 6.5× faster in common patterns with helper functions.
Bitmask-Aware Type Tracking
Per-type bitmask tracking replaces the boolean _untracked_flags system. When helper functions acquire types already tracked by the macro, the fast typed path is preserved via subset check (untracked ⊆ tracked).
Internal Naming Refactor
Internal identifiers renamed to reflect lazy-selective-rewind architecture (e.g. _mark_untracked! → _record_type_touch!, _depth_only_checkpoint! → _lazy_checkpoint!). Magic hex literals replaced with named constants. No user-facing API changes.
What's Changed
- (feat): Bitmask-Aware Untracked Tracking for
@with_poolby @mgyoo86 in #16 - (perf): Dynamic Selective Rewind & Typed-Fallback Optimization by @mgyoo86 in #17
- (refactor): rename internals to match evolved architecture by @mgyoo86 in #18
Full Changelog: v0.1.2...v0.2.0
v0.1.2
What's New
⚠️ Breaking: Unified Bit Type API
acquire!(pool, Bit, n) now returns BitVector instead of SubArray{Bool}.
Why: Native BitVector utilizes SIMD-optimized chunk algorithms, making operations like count(), sum(), and bitwise broadcasting 10×–100× faster compared to SubArray{Bool} views.
# Before (v0.1.1): Returned SubArray{Bool}
# After (v0.1.2): Returns native BitVector (SIMD optimized)
@with_pool pool function foo()
bv = acquire!(pool, Bit, 10_000)
# Operations using packed bits are significantly faster
c = count(bv) # 10x~100x speedup vs view behavior
endMigration: No code changes needed for typical usage. Only affects code explicitly type-checking for SubArray.
What's Changed
Full Changelog: v0.1.1...v0.1.2
v0.1.1
What's New
BitVector Pooling
Memory-efficient pooling for boolean arrays using Julia's native BitVector storage. Reduces memory usage by ~8x compared to Vector{Bool}.
@with_pool pool begin
# Packed storage (1 bit per element)
mask = acquire!(pool, Bit, 1024)
# N-dimensional support
grid = acquire!(pool, Bit, 128, 128)
endConvenience Functions
New trues! and falses! functions for drop-in replacement of Base allocations:
@with_pool pool begin
mask = falses!(pool, 1024) # All false
flags = trues!(pool, 10, 10) # All true, 2D
endThese mirror Julia's trues() and falses() with pooled memory management.
Memory Comparison
| Type | Storage | Memory (1024 elements) |
|---|---|---|
Vector{Bool} |
1 byte/element | 1024 bytes |
BitVector |
1 bit/element | 128 bytes |
What's Changed
Full Changelog: v0.1.0...v0.1.1
v0.1.0
What's Changed
- Add
unsafe_acquire!API and Optimize N-D Array Performance by @mgyoo86 in #1 - #N-D Cache for Zero-Alloction by @mgyoo86 in #2
- Export
checkpoint!andrewind!for Manual Pool Management by @mgyoo86 in #3 - Return ReshapedArray from acquire! for N-D arrays by @mgyoo86 in #4
- PR: N-way Cache for
unsafe_acquire!by @mgyoo86 in #5 - Untracked Acquire Detection & State Management Improvements by @mgyoo86 in #6
- Add Fixed Slot Infrastructure by @mgyoo86 in #7
- Add
reset!function and saferewind!behavior by @mgyoo86 in #8 - Add CUDA Backend Support by @mgyoo86 in #9
- Convenience Functions & DisabledPool by @mgyoo86 in #10
- Improve
@with_poolMacro Source Location for Better Coverage & Debugging by @mgyoo86 in #11 - docs: add GitHub Pages documentation with Documenter.jl by @mgyoo86 in #12
New Contributors
Full Changelog: https://github.com/ProjectTorreyPines/AdaptiveArrayPools.jl/commits/v0.1.0