feat!: require Rust 1.95, the minimum genoxide keeps from now on - #422
Merged
Merged
Conversation
tachsin
added a commit
that referenced
this pull request
Oct 2, 2026
…esult unchanged (#424) The follow-up to #402 and #422: the APIs that Rust 1.95 allows, plus the older ones #402 listed as "usable now". One topic per commit, each measured in instruction counts against its parent. Every seeded result is identical to the bit: `portable_runs`, the linalg fixed-bit tests, and all 223 examples against their `output.txt`. **Instruction counts, this branch against main** (valgrind, gungraun 0.19.4, Rust 1.99, one codegen unit). No benchmark gained. | Benchmark | Change | |---|---| | L-BFGS-B rounds, n = 1000 | −4.94% | | L-BFGS-B with forward differences | −1.11% | | gemm, n = 64 | −3.13% | | Cholesky, n = 200 | −0.81% | | CMA-ES sep-100 | −1.24% | | CMA-ES 10 | −0.29% | | DE generation | −0.12% | **Kept:** - **`core::hint::cold_path`** (1.95) on `ln`'s special cases, the source of the CMA-ES and DE gains, and on `exp`, a NaN violation, the Cholesky pivot, L-BFGS-B's projected gradient and Nelder-Mead's mirror. - **`array_windows`** (1.94) in Rosenbrock, Dixon-Price, Trid, Penalized 1 and 2, Schaffer F7, Kursawe, the gradients, the crowding distance, `nn` and more. The same float operations, in the same order. - **Slices cut to n** in `gemv` and in L-BFGS-B's O(n) loops, which removes their bounds checks. This is the −4.94%. - **`as_chunks_mut`** in gemm's A panel and in the Cholesky update's panel. - **`#[expect]` in place of `#[allow]`.** This removed the stale `dead_code` allows of `cholesky` and `triangular`, which L-BFGS-B uses now, and a stale `type_complexity`. - **For clarity, with counts unchanged:** `split_off`, `split_last_chunk` and `as_array` in checkpoints; `carrying_mul` in `below_u64`; `isqrt` in SPEA2 (the same k for every n up to 2^28); `is_multiple_of`. **Dropped, measured:** - **`cold_path` in `below_u64`:** tournament selection −2.9%, but DE +1.6%. - **`cold_path` in `Fitness::try_new`:** the fitness loop −8.5%, but the OneMax run +1.45%. - **`cold_path` on L-BFGS-B's skipped pair:** a small cost. - **`as_chunks_mut` for the Cholesky column tiles:** +0.87%. - **`f64::midpoint` in DE:** identical to the bit over 200M pairs and every class of f64, but DE +0.39%. **Not adopted:** `cfg_select!`. rustfmt doesn't format inside it, and the paired functions read no better wrapped in it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The decision in #402: the minimum supported Rust version moves from 1.88 to 1.95, and stays there.
Changes:
rust-version = "1.95"inCargo.tomlandpython/Cargo.toml.MSRV (1.95), ondtolnay/rust-toolchain@1.95.Checked:
cargo +1.95 check --all-targets --all-featurespasses.-D warnings, default and--all-featuresand on the Python crate, finds nothing new under the newrust-version.What 1.95 allows (#402), each to be adopted in its own PR, measured by the benchmarks and the bit-identical tests:
core::hint::cold_path(1.95) for rare branches in hot code;array_windows(1.94);as_array(1.93),cfg_select!(1.95) andcarrying_mul(1.91).Compiler improvements, LLVM 23 included, come with whatever toolchain users build with, whatever the minimum.
Who is affected: builds from source on a compiler older than 1.95, such as distribution packages up to Ubuntu 26.04's 1.93. rustup users and the Python wheels are unaffected. This is a breaking change, so the next release is a minor one.