Skip to content

Build Windows Debug CI with /O2 /Ob1 - #302

Merged
zfergus merged 1 commit into
mainfrom
chore/ci-windows-debug-opt
Nov 10, 2026
Merged

zfergus merged 1 commit into
mainfrom
chore/ci-windows-debug-opt

Conversation

@zfergus

@zfergus zfergus commented Nov 10, 2026

Copy link
Copy Markdown
Member

Description

Builds the Windows Debug CI job with /O2 /Ob1 instead of /Od /Ob0 /RTC1, following the Linux/macOS -O1 change in #301. Only .github/workflows/continuous.yml changes.

  • After Fix stale ccache keys and slow Debug CI tests #301, Windows Debug is the longest CI job: its Tests step normally takes 1,100–2,000 s.
  • Summed over all tests, Windows Debug spends 6,258 s vs 468 s for Windows Release (13×). Linux Debug went from 5,311 s at -O0 to 171 s at -O1.
  • There are two separate costs:
    • No inlining at /Od: Eigen-heavy tests suffer as they did on Linux -O0, e.g. GCP rest-shape measure at 1,114 s.
    • The Debug runtime's STL iterator checks: Point-triangle distance type takes 403 s vs 24 s on Linux -O0, and LBVH::build takes 435 s vs 60 s.
  • /O2 removes the first cost. /Ob1 still inlines Eigen's small functions but avoids the extra compile time of /Ob2.

Impact:

  • Kept: asserts (NDEBUG stays undefined) and the STL iterator checks (Debug runtime), which are what Windows Debug catches that Linux Debug doesn't.
  • Lost: /RTC1's stack-frame and uninitialized-variable checks, since MSVC can't combine them with optimization. The ODR check job still covers the Eigen ABI stack-smashing case.
  • Cold builds get slower: somewhere between today's Debug (~750 s) and Release (~1,800 s). Warm ccache builds from main (enabled by Fix stale ccache keys and slow Debug CI tests #301) absorb this after the first push.

Type of change

  • Enhancement (non-breaking change which improves existing functionality)

How Has This Been Tested?

  • Per-test timings taken from the CI logs of Fix stale ccache keys and slow Debug CI tests #301 (Windows Debug, Windows Release, Linux Debug -O0 and -O1).
  • Windows Debug Tests-step times across the last 19 runs range from 692 s to 1,983 s; build time scales with them, so the variance comes from the runners.
  • continuous.yml parses as YAML.
  • The speedup itself is only measurable on this PR's CI (no local Windows machine). This PR's build will be cold, but the Tests step isn't affected by caching.

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

Keeps asserts and the Debug runtime's STL iterator checks but drops
/RTC1, which MSVC can't combine with optimization.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zfergus
zfergus merged commit 3dd025f into main Nov 10, 2026
6 checks passed
@zfergus
zfergus deleted the chore/ci-windows-debug-opt branch November 10, 2026 02:18
@zfergus zfergus mentioned this pull request Nov 10, 2026
5 of 7 tasks
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