Skip to content

release: 3.0.0-alpha.19 - #23

Merged
jpurnell merged 10 commits into
mainfrom
release/3.0.0-alpha.19
Nov 24, 2026
Merged

jpurnell merged 10 commits into
mainfrom
release/3.0.0-alpha.19

Conversation

@jpurnell

Copy link
Copy Markdown
Owner

Summary

  • Speed fix: the grouped-ranking toolkit and the penalised LogisticRegression.fit(penalty:) are specialised for Double (@_specialize(exported: true, where T == Double)), so cross-module callers run about 30x faster. No API or result change. GroupedRankingPerformanceTests guards every entry point (optimised build only).
  • Dependency: minimum swift-crypto raised from 3.0.0 to 5.1.2. It is linked only where CryptoKit is absent (Linux, Android); the one call is SHA256.hash(data:).
  • CHANGELOG, README and master plan reconciled.

Verification

  • Full quality-gate --check all --strict: PASSED, 51 of 51 checkers (consistency skipped, not configured).
  • swift test -c release --filter GroupedRankingPerformanceTests: 2 tests passed.
  • swift-crypto 5.1.2: resolves, and BusinessMath builds on macOS. A Linux/Android build was not run. Packages that pin swift-crypto below 5 will fail to resolve until they move.

🤖 Generated with Claude Code

https://claude.ai/code/session_017dtpLXUs8Gv19sbPC1h3yS

jpurnell and others added 10 commits November 22, 2026 21:26
…(about 30x faster for Double callers); performance guard

The toolkit and the penalised logistic fit were generic with no Double version, so a caller in another module paid a runtime type lookup per operation. Adds @_specialize(exported: true, where T == Double) to the public entry points, a release-only guard that times each heavy entry point against a plain Double evaluation, a CHANGELOG entry and an ADR-011 addendum.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017dtpLZ6XGCJVmSqc1u4qUt
…ery specialised entry point, drop attributes that gain nothing

Measured specialised against unspecialised for each public entry point; the model initialiser, featureCounts and summary gain nothing and lose the attribute. The guard now bounds all eleven that matter (data construction, scores, perGroup, pooledEvaluation, fitScale and referenceFit added). CHANGELOG and the ADR-011 addendum carry the measured ratios.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017dtpLZ6XGCJVmSqc1u4qUt
…two attributes that gain nothing

Mutation audit: removing the attribute from the dense or ranked GroupedChoiceData initialiser was not caught (the guard only built from sparse rows); it now bounds both (165 and 177 plain evaluations unspecialised against 8.6 and 8.7). referenceFit and the negativeLogLikelihood(fit) wrapper measure the same with and without the attribute, so it comes off them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017dtpLZ6XGCJVmSqc1u4qUt
Raise the minimum swift-crypto to 5.1.2. The grouped-ranking speed fix
(already on this branch) moves from Unreleased into the release. CHANGELOG,
README and master plan reconciled.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017dtpLXUs8Gv19sbPC1h3yS
…nnot install 6.3 or 6.4)

setup-swift@v2 fails on 6.3 and 6.4; SwiftyLab/setup-swift installs from
swift.org directly and tracks current releases. Pinned to the v1.14.2 commit.
swift-crypto 5.1.2 does not compile on 6.2.1 (@nonexhaustive).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017dtpLXUs8Gv19sbPC1h3yS
…e-checker timeouts in 25 test files on Linux, to investigate)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017dtpLXUs8Gv19sbPC1h3yS
…ck them

Written inline in @test(arguments:), the six tuples with Double.pi arithmetic were
type-checked as one macro-expanded expression, and 6.4.3 on Linux reported
'unable to type-check this expression in reasonable time' (the only diagnostic in
the failing CI run). Same cases, now a typed static constant.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017dtpLXUs8Gv19sbPC1h3yS
Found by running the whole suite on a Linux x86_64 machine with Swift 6.4.2, not by CI.
swift-foundation on Linux traps (SIGILL) on a NaN Date in Calendar.dateComponents (with
seconds or nanoseconds requested) and Calendar.startOfDay(for:); year-only answers Int.max
where Darwin and 6.2.1 answered 4713. Each case runs in its own exit test, recorded as a
known issue so it fails the day Foundation stops trapping. Dated notes in the three Period
source headers. CHANGELOG records the platform difference and the verified versions.

Linux: 9811 tests, 948 suites passed, 3 known issues.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017dtpLXUs8Gv19sbPC1h3yS
The limit was one minute; the test takes 73 s alone on an idle 12-core Linux machine and
184-214 s on the 4-core CI runner, where all tests start at once and the CPU-bound ones starve
the rest. Swift 6.2.1 did not trip it at 214 s; 6.4.2 does. Ten minutes, as a hang guard.
Full suite on Linux pinned to 4 cores: 9811 tests passed, 3 known issues.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017dtpLXUs8Gv19sbPC1h3yS
@jpurnell
jpurnell merged commit 2028ca1 into main Nov 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant