Skip to content

Commit bfc55bd

Browse files
igerberclaude
andcommitted
Bump version to 2.0.3 and update documentation
- Update version to 2.0.3 in pyproject.toml, __init__.py, Cargo.toml - Add CHANGELOG entry documenting Rust backend optimizations - Update TODO.md to mark Rust optimizations as completed in v2.0.3 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent fd44573 commit bfc55bd

5 files changed

Lines changed: 25 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.0.3] - 2026-01-17
9+
10+
### Changed
11+
- **Rust backend performance optimizations** delivering up to 32x speedup for bootstrap operations
12+
- Bootstrap weight generation now 16x faster on average (up to 32x for Webb distribution)
13+
- Direct `Array2` allocation eliminates intermediate `Vec<Vec<f64>>` (~50% memory reduction)
14+
- Rayon chunk size tuning (`min_len=64`) reduces parallel scheduling overhead
15+
- Webb distribution uses lookup table instead of 6-way if-else chain
16+
17+
### Added
18+
- **Cholesky factorization** for symmetric positive-definite matrix inversion in Rust backend
19+
- ~2x faster than LU decomposition for well-conditioned matrices
20+
- Automatic fallback to LU for near-singular or indefinite matrices
21+
- **Vectorized variance computation** in Rust backend
22+
- HC1 meat computation: `X' @ (X * e²)` via BLAS instead of O(n×k²) loop
23+
- Score computation: broadcast multiplication instead of O(n×k) loop
24+
- **Static BLAS linking options** in `rust/Cargo.toml`
25+
- `openblas-static` and `intel-mkl-static` features for standalone distribution
26+
- Eliminates runtime BLAS dependency at cost of larger binary size
27+
828
## [2.0.2] - 2026-01-15
929

1030
### Fixed
@@ -368,6 +388,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
368388
- `to_dict()` and `to_dataframe()` export methods
369389
- `is_significant` and `significance_stars` properties
370390

391+
[2.0.3]: https://github.com/igerber/diff-diff/compare/v2.0.2...v2.0.3
371392
[2.0.2]: https://github.com/igerber/diff-diff/compare/v2.0.1...v2.0.2
372393
[2.0.1]: https://github.com/igerber/diff-diff/compare/v2.0.0...v2.0.1
373394
[2.0.0]: https://github.com/igerber/diff-diff/compare/v1.4.0...v2.0.0

TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Enhancements for `honest_did.py`:
9090

9191
## Rust Backend Optimizations
9292

93-
Deferred from PR #58 code review (completed in v2.1):
93+
Deferred from PR #58 code review (completed in v2.0.3):
9494

9595
- [x] **Matrix inversion efficiency** (`rust/src/linalg.rs`): ✅ Uses Cholesky factorization for symmetric positive-definite matrices with LU fallback for near-singular cases
9696
- [x] **Reduce bootstrap allocations** (`rust/src/bootstrap.rs`): ✅ Direct Array2 allocation eliminates Vec<Vec<f64>> intermediate. Also added Rayon chunk size tuning and Webb lookup table optimization.

diff_diff/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
plot_sensitivity,
118118
)
119119

120-
__version__ = "2.0.2"
120+
__version__ = "2.0.3"
121121
__all__ = [
122122
# Estimators
123123
"DifferenceInDifferences",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "maturin"
44

55
[project]
66
name = "diff-diff"
7-
version = "2.0.2"
7+
version = "2.0.3"
88
description = "A library for Difference-in-Differences causal inference analysis"
99
readme = "README.md"
1010
license = "MIT"

rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "diff_diff_rust"
3-
version = "2.0.0"
3+
version = "2.0.3"
44
edition = "2021"
55
description = "Rust backend for diff-diff DiD library"
66
license = "MIT"

0 commit comments

Comments
 (0)