12 comments

[ 3.2 ms ] story [ 36.0 ms ] thread
The same is true when running Winamp. When I was dabbling with FreeBASIC many years ago, my games performed better when I was listening to music. Same reason!
>Windows Energy-saving timer heuristics

Another example of Windows' technical debt being there, low-hanging fruit-wise, to be cashed in by performance-oriented developers. Its interesting that Youtube changing the timer resolution propagates to other threads .. does this harken to darker days in the MSDOS era? Youtube, another Turbo button?

Connections like this are fun and interesting but highlight what a complete junk pile our (extractive, spying, slow, bloated, eating power for no reason) stack is. we need a rewrite starting from the boot loader of almost every OS in use in the world
That would just create a bunch of new OSs that are worthless. Don’t forget the real point is to run applications, not an OS.
The NT kernel is splendid. The OS is not.
For its context I agree but the whole chip arch is rotten so it’s doomed too unfortunately
I noticed in the thread that someone mentioned using `Sleep(16, 1)` gives a stable 60 fps, but I like to always drop a link to https://gafferongames.com/post/fix_your_timestep/ and decouple your game movement from your fps. It's a bit more math, but it is usually pretty smooth in my experience.
Windows man. While linux is cursed in many ways, not being able to just know your PC's performance profile just seems so backwards to me. It's one of those things (lack of control) I don't miss.
I was recently astonished when using speech recognition software on my computer finally made the computer silent. So when I use the speech recognition, my fan just stops. I investigated it and it does not stop, but the speech recognition software seems to slow down the fan to the minimal speed, even though the CPU cores are getting hotter and hotter. You never know these days what programs do.
IS FreeBaisc still a thing nowadays ? I understand it's surely less popular, but are there people using it on HN ?
> Certain browsers allow YouTube to set the internal resolution of the timer to a lower value

It's wild to me that browsers expose this kind of control over my system to third party developers. I think making the browser an "application platform" was overall a mistake. Call me crazy, but I just want a browser that fetches and displays web sites.

The browser isn't exposing it to websites. It's simply due to the fact of playing media that it's lowering the minimum timer resolution on Windows. In the past it would also do this when just scrolling among other things if I remember correctly, I'm not sure if it still does this.

Firefox uses a different method that doesn't require lowering the minimum timer resolution.

Either way the global behavior of this is no longer true on modern Windows 10/11 machines (as of Windows 10 2004) as each process must now call timeBeginPeriod if it wants increased timer resolution: https://randomascii.wordpress.com/2020/10/04/windows-timer-r...

https://learn.microsoft.com/en-us/windows/win32/api/timeapi/...