Skip to content

Conversation

@elad335
Copy link
Contributor

@elad335 elad335 commented Dec 21, 2025

Maybe fixes #17575

@AniLeo AniLeo requested a review from kd-11 December 21, 2025 16:13
return 0;
}

if (freq.QuadPart <= 50'000)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is possible for any known TSC. 50KHz cycle counter is way too coarse for a high precision timer.
For reference the archaic RTC already has 32k resolution.
Let's gather data for now though before we decide which values to use for tuning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't about possible motherboards or CPUs or operating system settings, it's the constraint for the function itself.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get that, but why 50k then? Why isn't any non-zero value legal?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the other explanation, it makes sense to have a lower bound. Let's at least make it a named constexpr like min_supported_tsc_frequency instead of magic constants.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Regression] Huge stutters and performance regressions after build 0.0.33-17061 in WINDOWS 11

2 participants