Releases: ProjectTorreyPines/AdaptiveArrayPools.jl
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