Skip to content

Releases: dathere/qsv-stats

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

0.24.0

08 Dec 12:59
2f122e8
Compare
Choose a tag to compare

qsv-stats 0.24.0 Release Notes

Documentation Changes

  • Clarified MAD as "Median Absolute Deviation" in code documentation
  • Updated documentation to reflect that qsv-stats can be used independently of qsv
  • Added deeplink to qsv stats command in README
  • Improved README clarity and organization
  • Added repository header

Organizational Changes

  • Repository moved to datHere GitHub organization
    • Updated homepage and repository URLs in Cargo.toml

Performance Improvements

  • Optimized means calculation with single-pass updates
  • Improved performance of statistics calculation using fused multiply-add operations
  • Reordered Unsorted struct fields for better performance (sorted flag first)
  • Reduced initial allocation size for modes from 10,000 to 1,000 items for better memory usage

Code Quality

  • Removed unwrap() calls in favor of more robust error handling
  • Refactored means sampling implementation
  • Improved code organization and documentation
  • Enhanced safety with better error propagation

Internal Changes

  • Combined harmonic and geometric mean updates into a single match statement
  • Simplified delta calculations in online statistics
  • Cleaned up unnecessary comments

Usage

Add to your Cargo.toml:

[dependencies]
qsv-stats = "0.24"

0.23.0

07 Dec 23:00
5da6829
Compare
Choose a tag to compare

qsv-stats 0.23.0 Release Notes

New Features

  • Added geometric mean calculation support
  • Added harmonic mean calculation support

Performance Improvements

  • Removed unnecessary bounds checks in median calculation on sorted data
  • Optimized quartiles calculation on sorted data
  • Reduced initial frequency map capacity from 10k to 1k for better memory usage
  • Added several performance-oriented frequency calculation helpers:
    • Added fast path for incrementing existing frequency values
    • Added optimized methods for frequency analysis without full sorting
    • Added efficient top_n() and bottom_n() methods for frequency counts

Code Quality

  • Updated minimum supported Rust version (MSRV) to 1.83
  • Fixed various Clippy warnings:
    • Removed unnecessary map_or usage
    • Applied suggested if_not_else patterns
    • Added const qualifiers where appropriate
    • Fixed option_if_else patterns
    • Improved other miscellaneous Clippy suggestions

Internal Changes

  • Refactored frequency sampling implementation
  • Added additional frequency helper methods:
    • items_with_count()
    • total_count()
    • has_count()
  • Improved code organization and documentation

Dependencies

  • No breaking changes to external dependencies

0.22.0

08 Sep 17:39
Compare
Choose a tag to compare
  • added parallel processing option to cardinality

Full Changelog: 0.21.0...0.22.0

0.21.0

08 Sep 15:46
Compare
Choose a tag to compare

Refactored cardinality computation

  • allow inline(always)
  • use PartialEq instead of Eq trait so we can handle floats
  • add sorted parm to cardinality so we can skip sorting if the data is already sorted
  • added already_sorted helper
  • instead of using dedup, we just doing a loop checking for unique_counts, without doing the other things that dedup does (i.e. removing dupes, so we check len afterwards to get cardinality), making it faster.
  • added several tests exercising cardinality

Full Changelog: 0.20.0...0.21.0

0.20.0

07 Sep 19:04
Compare
Choose a tag to compare
  • optimize minmax.rs - modes and antimodes calculation
  • micro-optimize online.rs - streaming stats calculations
  • added more early returns on empty datasets
  • optimize merge of minmax.rs to avoid unnecessary allocation by using std::mem::take

Full Changelog: 0.19.1...0.20.0

0.19.1

06 Sep 03:28
Compare
Choose a tag to compare
  • minor microoptimizations
  • bump MSRV to 1.81 as there are new improve sort algorithms that we can take advantage of

Full Changelog: 0.19.0...0.19.1

0.19.0

02 Sep 02:34
Compare
Choose a tag to compare
  • Bump MSRV to 1.80
  • Refactor MinMax algorithm to also track sort order

Full Changelog: 0.18.0...0.19.0