Skip to content

ZiggyAlloc 1.3.0

Choose a tag to compare

@alexzzzs alexzzzs released this 26 Sep 04:54
· 54 commits to main since this release

ZiggyAlloc v1.3.0 Release Notes

Major Performance Improvements

a

SIMD Memory Operations - Revolutionary Speed Boost

  • 5-29x faster memory operations using AVX2 hardware acceleration
  • ZeroMemory: 15x faster (1KB), 26x faster (16KB), 29x faster (64KB)
  • CopyMemory: 7x faster (1KB), 8x faster (16KB), 5.5x faster (64KB)
  • Automatic fallback for older hardware - no compatibility issues

System-Wide Performance Gains

  • 25-40% overall performance improvement across all allocation patterns
  • SystemMemoryAllocator: 20-35% faster with Unsafe.SizeOf<T>() optimization
  • UnmanagedBuffer: 10-20% improvement in span operations
  • UnmanagedMemoryPool: 35-55% faster with SpinLock optimization

New Features

LargeBlockAllocator

  • Specialized allocator for large memory blocks (>64KB)
  • Optimized pooling and alignment for high-performance applications
  • Perfect for image processing, scientific computing, and data-intensive applications

Enhanced Benchmark Suite

  • ExperimentalOptimizationsBenchmarks - Measure optimization effectiveness
  • SimdPerformanceBenchmarks - Comprehensive SIMD-specific testing
  • Real-world performance validation across different hardware configurations

Reliability & Stability Improvements

Cross-Platform CI/CD

  • Fixed ARM64 test crashes with memory management optimizations
  • Enhanced test isolation to prevent memory pressure issues
  • Improved error handling with comprehensive debug logging
  • Thread safety improvements across all allocator classes

Memory Management

  • Better cache locality and reduced GC pressure
  • Enhanced disposal patterns and resource cleanup
  • Memory leak detection improvements
  • Input validation across all major classes

Performance Benchmarks

Memory Operations (AVX2)

Operation Size Before After Improvement
ZeroMemory 1KB Baseline 15x faster 1400%
ZeroMemory 16KB Baseline 26x faster 2500%
ZeroMemory 64KB Baseline 29x faster 2800%
CopyMemory 1KB Baseline 7x faster 600%
CopyMemory 16KB Baseline 8x faster 700%
CopyMemory 64KB Baseline 5.5x faster 450%

Allocator Performance

  • SystemMemoryAllocator: 20-35% faster allocation
  • UnmanagedMemoryPool: 35-55% faster pool operations
  • UnmanagedBuffer: 10-20% improvement in span operations
  • Overall System: 25-40% performance improvement

Migration Guide

No Breaking Changes

  • All existing APIs remain unchanged
  • Performance improvements are automatic
  • No code changes required to benefit from optimizations

Recommended Updates

  • Consider using LargeBlockAllocator for allocations >64KB
  • Review benchmark results to optimize allocator selection
  • Enable SIMD optimizations for memory-intensive applications

Bug Fixes

  • Fixed potential memory leaks in multiple components
  • Resolved null pointer access issues
  • Enhanced exception handling across all allocators
  • Fixed race conditions in singleton access patterns
  • Resolved compiler warnings and improved code quality

Usage Recommendations

For Maximum Performance

  1. Use SystemMemoryAllocator for general-purpose allocations
  2. Use LargeBlockAllocator for large memory blocks (>64KB)
  3. Use UnmanagedMemoryPool for high-frequency allocations
  4. Enable SIMD operations for memory-intensive workloads

For Reliability

  1. Use DebugAllocator during development for leak detection
  2. Use ScopedAllocator for automatic cleanup
  3. Use DeferScope for complex resource management scenarios

Technical Details

Hardware Requirements

  • SIMD Operations: AVX2 support recommended (automatic fallback available)
  • Memory: Minimum 1GB RAM (2GB+ recommended for large allocations)
  • Platform: .NET 8.0+ (Windows, Linux, macOS)

Threading

  • All allocators are thread-safe
  • Enhanced synchronization patterns
  • Improved contention handling with SpinLock optimization