Skip to content

v0.2.1

Latest

Choose a tag to compare

@clarkbw clarkbw released this 07 Sep 12:36
· 25 commits to main since this release
addcc73

Almanac 0.2.1 reduces repeated astronomy work in TypeScript and Swift, with the same public API and fixture tolerances.

  • Reuse Moon geometry for illumination and flatten the Moon model's scratch arrays.
  • Share solar crossing probes, skip crossings before the requested window, and accelerate altitude refinement with a verified bracket and bisection fallback.
  • Reuse peak shadow geometry when calculating eclipse contacts.
  • Expand the shared performance harness to 15 workloads, including an empty eclipse window that exercises latitude pruning, and document how to reproduce comparisons in the README.

The hosted CI comparison measured these reductions in median query time versus the 0.2.0 astronomy code:

Workload TypeScript Swift
Sky track / 228 hours 40.0% 42.4%
Sun events / 228 hours 39.3% 40.2%
Moon events / 228 hours 39.1% 35.1%
Previous lunar eclipse 26.0% 36.6%
Lunar eclipses / 1950–2100 26.4% 23.4%

Both revisions used the same harness and toolchain within each port, with seven interleaved process pairs and 300 ms warmup. Build/startup time is excluded; timings vary by machine. All 15 workloads pass the 20% regression gate in both ports.

Refined rise/set and twilight times can shift by up to 600 ms after quantization; event counts and kinds are unchanged, and existing accuracy and parity tolerances are preserved. Validation includes 86 TypeScript tests, 91 Swift release tests, and the shared fixture checks.

npm install @openwaters/almanac@0.2.1
.package(url: "https://github.com/openwatersio/almanac.git", exact: "0.2.1")

Performance changes: #10.

Full changelog.