Skip to content

Releases: dathere/qsv-stats

0.33.0

13 Jun 15:27
Compare
Choose a tag to compare

🚀 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

0.32.0

23 Mar 13:44
Compare
Choose a tag to compare

What's changed

Full Changelog: 0.31.0...0.32.0

0.31.0

16 Mar 03:23
Compare
Choose a tag to compare

What's changed

  • micro-optimize minmax sampling 3980676
  • add custom_percentiles 7173f97
  • set MSRV to 1.85
  • migrate to Rust 2024 edition
  • applied clippy lint suggestions
  • micro-optimize frequency 90dd664

Full Changelog: 0.30.0...0.31.0

0.30.0

06 Feb 21:38
Compare
Choose a tag to compare

What's changed

  • optimized MinMax sampling, removing sort_order element and just deriving it from sortiness

Full Changelog: 0.29.0...0.30.0

0.29.0

04 Feb 01:51
Compare
Choose a tag to compare

What Changed:

  • add sortiness function to minmax

Full Changelog: 0.28.0...0.29.0

0.28.0

02 Feb 16:21
Compare
Choose a tag to compare

What's Changed

  • refactored cardinality calculation to skip unneeded bounds check, and made parallel processing more efficient

Full Changelog: 0.27.0...0.28.0

0.27.0

01 Feb 14:09
Compare
Choose a tag to compare

What Changed:

  • consolidated modes & antimodes calc so its derived both in a single pass, and not separately
  • remove unused nightly feature

Full Changelog: 0.26.1...0.27.0

0.26.1

16 Jan 04:20
Compare
Choose a tag to compare
  • micro-optimize online sampling

Full Changelog: 0.26.0...0.26.1

0.26.0

12 Jan 22:36
Compare
Choose a tag to compare

qsv-stats 0.26.0 Release Notes

Performance Improvements

  • Extensive use of unwrap_unchecked in performance-critical paths where unwrap is guaranteed safe
  • Optimized OnlineStats::merge() with early returns and cached totals
  • Improved vector preallocation in modes_on_sorted using square root of size instead of size/3
  • Removed unneeded nightly optimization features in favor of more targeted performance improvements

Code Quality

  • Bumped Minimum Supported Rust Version (MSRV) to latest Rust stable (1.84)
  • Refactored modes_on_sorted:
    • Added early return on empty iterator
    • Improved vector preallocation strategy
  • Enhanced Commute implementation for Unsorted merge with early returns
  • Optimized OnlineStats merge operation with better caching
  • Suppressed clippy::cast_sign_loss warnings where appropriate

Documentation

  • Added detailed note about modes() function returning all modes with the same frequency
  • Improved formatting of documentation comments
  • Added clarifying comments about relationship between mode() and modes() functions
  • Added test coverage for least_frequent() function

Internal Changes

  • Multiple performance-focused refactors using unwrap_unchecked in hot loops
  • Better error handling with early returns in several key functions
  • Code cleanup and documentation improvements throughout

0.25.0

08 Dec 19:42
b31de4e
Compare
Choose a tag to compare

qsv-stats 0.25.0 Release Notes

Performance Improvements

  • Optimized median calculation with improved bounds checking
  • Refactored antimodes calculation for better efficiency and memory usage
  • Added #[inline] attributes to frequently called functions:
    • stddev()
    • variance()
    • mean()

Code Quality

  • Complete rewrite of antimodes_on_sorted implementation
    • More efficient memory usage
    • Better handling of edge cases
    • Clearer code organization
  • Enhanced safety with additional code comments explaining unsafe operations
  • Improved bounds checking in median calculations

Documentation

  • Added clarifying documentation for antimodes behavior (only returns first 10 antimodes)
  • Added safety comments explaining numeric conversions
  • Improved code readability with detailed comments explaining algorithmic steps

Internal Changes

  • Fully qualified std::fmt usage in debug assertions
  • Simplified frequency increment checks using is_some_and
  • Applied rustfmt formatting
  • Removed unnecessary imports

Usage

Add to your Cargo.toml:

[dependencies]
qsv-stats = "0.25"

Full Changelog: 0.24.0...0.25.0