Skip to content

0.33.0

Latest
Compare
Choose a tag to compare
@jqnatividad jqnatividad released this 13 Jun 15:27

πŸš€ Performance Improvements

Memory Optimization

  • Optimized OnlineStats struct memory layout for better cache efficiency and reduced memory footprint

Computation Optimizations

  • Implemented Fused Multiply-Add (FMA) operations for harmonic_sum and geometric_sum calculations, providing better numerical accuracy and performance
  • Replaced floating-point comparisons with is_sign_negative() bit checking for faster negative value detection
  • Refactored frequency calculations to use HashMap entry API, eliminating double lookups and improving insertion performance
  • Added with_capacity implementation for frequency structures to reduce memory allocations

✨ Features

Quartile Computation Enhancements

  • Added two new selection algorithm variants for computing quartiles:
    • Clone-based selection algorithm variant
    • Zero-copy selection algorithm variant
  • Benchmarking revealed that parallel sort-based algorithms consistently outperform selection-based approaches
  • Removed quartiles_adaptive() function based on performance analysis showing parallel sort is always faster

πŸ”§ Code Quality & Maintenance

Dependency Management

  • Updated MSRV (Minimum Supported Rust Version) to latest Rust stable
  • Refined rayon dependency specification to filter on major version only

Code Cleanup

  • Fixed Clippy warning regarding lifetime syntax flowing from input to output with different syntax patterns
  • Improved code consistency and maintainability

πŸ“Š What's Changed

This release focuses heavily on performance optimizations while maintaining API stability. The enhancements to quartile computation provide more flexibility for different use cases, though benchmarking has shown the existing parallel sort approach remains the most efficient for general usage.

The FMA optimizations and memory layout improvements should provide noticeable performance benefits, especially when processing large datasets or performing intensive statistical computations.

Full Changelog: 0.32.0...0.33.0