Releases: botirk38/zeropool
Releases · botirk38/zeropool
ZeroPool v0.3.1
What's Changed
🐛 Bug Fixes
- Platform Compatibility: Fixed tokio-uring feature to only compile on Linux systems, resolving CI failures on macOS and Windows when using
--all-features
🔧 CI/CD Improvements
- Linting: Updated Clippy configuration to allow unsafe code warnings while maintaining strict safety standards
- Documentation: Fixed HTML tag issues in doc comments for better documentation generation
📚 Documentation
- README: Enhanced clarity on performance optimizations, security, and use cases
- API Docs: Improved formatting and consistency in documentation comments
🏗️ Internal Improvements
- Code Quality: Simplified vector initialization logic for better maintainability
- Feature Gates: Properly gated tokio-uring functionality by both feature flag and target OS
🚀 Features
- tokio-uring Support: Added optional zero-copy I/O support for Linux systems (requires
--features tokio-uring)
This release maintains ZeroPool's focus on maximum performance while improving cross-platform compatibility and code quality.
ZeroPool v0.3.0
What's New in v0.3.0
Breaking Changes
- BREAKING:
BufferPool::get()now returnsPooledBufferinstead ofVec<u8>PooledBufferimplementsDeref<Target = Vec<u8>>for transparent access- Buffers automatically return to pool when dropped (RAII pattern)
- No more manual
pool.put()calls needed
- BREAKING:
BufferPool::put()is now internal-only (pub(crate))
New Features
- New
PooledBuffertype with automatic buffer return via Drop trait - Configurable eviction policies (LIFO, ClockPro) for fine-tuned performance
- Profiling binaries for performance analysis:
ml_checkpoint_loader: ML model loading simulationnetwork_server: Multi-threaded network server simulationfile_pipeline: File processing pipeline simulationstress_test: High-stress workload testing
- Modularized codebase with separate modules
Improvements
- Removed all unsafe code blocks for improved safety
- Fixed all clippy warnings and formatting issues
- Improved code organization and documentation
Migration Guide
Before (v0.2.x):
let buf = pool.get(1024);
// use buf
pool.put(buf); // Manual returnAfter (v0.3.0):
let buf = pool.get(1024);
// use buf
// Auto-returns on drop!
// For explicit early return:
drop(buf);See CHANGELOG.md for full details.
Release v0.2.1
Release v0.2.1
Major Changes
- Modularized codebase: Split the monolithic `lib.rs` into focused modules (`config.rs`, `pool.rs`, `tls.rs`, `utils.rs`) for better maintainability and code organization.
New Features
- Configurable eviction policies: Added support for CLOCK-Pro (default) and LIFO buffer eviction strategies to optimize cache behavior for different workloads.
- CLOCK-Pro: Intelligent eviction using access counters for better cache locality (~8 bytes overhead per buffer)
- LIFO: Simple last-in-first-out for minimal overhead and best uniform buffer size performance
Improvements
- Expanded benchmarking suite with new performance tests for allocation patterns, cache behavior, and memory features
- Added profiling support with flamegraph and perf data artifacts
- Updated documentation with eviction policy usage examples
Technical Details
- Improved code idiomaticity and thread-local shard affinity
- Fixed clippy warnings and code formatting
- Enhanced performance testing capabilities
v0.2.0 - Thread-Local Shard Affinity
Release v0.2.0 - Thread-Local Shard Affinity Major performance improvements through architectural changes: Performance Gains: - Multi-threaded throughput: 32 TiB/s at 8 threads (14-38% improvement) - 2 threads: 14.2 TiB/s (38% faster than v0.1.5) - 4 threads: 25.0 TiB/s (34% faster than v0.1.5) - 8 threads: 32.0 TiB/s (14% faster than v0.1.5) - 8.2x faster than sharded-slab in multi-threaded scenarios Architecture Changes: - Thread-local shard affinity replacing round-robin selection - Each thread consistently uses same shard for better cache locality - Reduced CPU cache line bouncing between cores - Hash-based thread-to-shard assignment for balanced distribution Code Quality Improvements: - Added debug assertions to all unsafe code blocks - Removed unnecessary const qualifiers from builder methods - Simplified conditionals using idiomatic Rust patterns (match, let-else) - Optimized TLS cache initialization - Better inline attributes for compiler optimization - Builder validation with documented panic conditions Breaking Changes: - None - fully backward compatible API Benchmarks run on Intel i9-10900K @ 3.7GHz, Linux 6.14.0
v0.1.5
Fixes
- Fix clippy warning: remove unnecessary cast in pin_buffer function
- Format code with cargo fmt for consistency
Full Changelog: v0.1.4...v0.1.5
v0.1.4
Performance Improvements
- O(1) len() queries: Added atomic counters for instant pool size queries without locking
- Optimized memory pinning: Redesigned pinning strategy for better performance
- Unchecked shard indexing: Eliminated redundant bounds checks using bitmask guarantees
- Improved preallocate(): Batch allocation and distribution with minimal locking
Enhancements
- Add pinned memory benchmarks
- Enhanced safety documentation with detailed explanations of unsafe usage
- Improved Builder API for pinned_memory configuration
Full Changelog: v0.1.3...v0.1.4
v0.1.3
Changes
- Add workflow_dispatch trigger to publish action for manual releases
- Add dry-run option to publish workflow
- Style improvements: remove unnecessary blank line in lib.rs
- Improve test assertion clarity
Full Changelog: https://github.com/ZeroPool/zeropool/compare/v0.1.2...v0.1.3
v0.1.2 - Idiomatic Builder Pattern & Memory Pinning
What's New
Idiomatic Rust Builder Pattern
- Added BufferPool::builder following tokio/rayon style
- Removed non-idiomatic preset methods
- Made PoolConfig private (internal implementation)
Memory Pinning Support
- Added pinned_memory builder method
- Always available (no feature flags needed)
- Pre-allocates and pins buffers for optimal performance
- Graceful fallback if pinning fails
Improved Test Coverage
- 12 comprehensive tests (was 5)
- New tests: builder API, pinned memory, concurrent access, edge cases
- All tests passing, clippy clean
Rust Best Practices
- const fn for builder methods
- Proper must_use annotations
- Modern format strings
- Optimized allocations
API Changes
New:
- BufferPool::builder
- Builder::min_buffer_size
- Builder::num_shards
- Builder::tls_cache_size
- Builder::max_buffers_per_shard
- Builder::pinned_memory
Removed:
- PoolConfig public API (now private)
- PoolConfig preset methods
Migration Guide
Before:
let pool = BufferPool::with_config(PoolConfig::default().with_min_buffer_size(512 * 1024));
After:
let pool = BufferPool::builder().min_buffer_size(512 * 1024).build();