• FauxLiving
    link
    fedilink
    English
    arrow-up
    25
    ·
    2 days ago

    The CPU has a power saving mode that lets it slow down whenever a thread is sleeping (even a few milliseconds). In games, the main thread does short bursts of work then sleeps briefly. So the CPU keeps waking up “cold” at a low speed, causing occasional slow frames (the “1% lows”).

    The patch adds a window where the CPU won’t go into the power saving state immediately, so when the thread starts working again the CPU is at full speed already.

        • MalReynolds@piefed.social
          link
          fedilink
          English
          arrow-up
          10
          ·
          1 day ago

          “Premature optimization is the root of all evil” is a quote from Donald Knuth, one of the grand oldies of Computer Science. Basically get everything working and tested in the real world before even thinking about optimizing, it may be unnecessary or needed somewhere you didn’t expect.

          In this case the optimization of spinning down as fast as possible is good in the use case of servers to save power and heat, but not good for gaming.

          • Shayeta@feddit.org
            link
            fedilink
            English
            arrow-up
            5
            ·
            1 day ago

            That makes much more sense. I though you considered this fix a premature optimization.

            Ultimately, I guess it depends on the workload.