News for hackers. Stuff that matters.
Re:How to waste CPU like a Professional by dmoy on Friday September 19, 2025 @06:11PM (#45307331)
Ah very cool. I thought this was going to be a tongue-in-cheek article about the proliferation of random corporate-mandated CPU hogs like croudstrike or w/e.

Pleasantly surprised by the technical article :). Reminds me of a lot of precise-number-of-idle-cycles functions from embedded world in a prior life

Re:How to waste CPU like a Professional by PaulKeeble on Friday September 19, 2025 @06:57PM (#45307761)
Likewise. Wasting user space CPU cycles is actually a moderately tricky thing to do when we have optimising compilers. Its not something that comes up a lot but it is occasionally something you do need to do in order to test other things and it is different to making a lot of system calls.

I think volatile is usually fairly well contained I can't immediately think of an obvious case where it could adjust the performance of the calling context indirectly but its pushing the problem onto that cache coherence part of the CPU so its not quite the same as an algorithm that consumes all the memory bandwidth or execution ports. Lots of little interesting trade offs in the weeds of this and other potential solutions depending on if any of this matters.

Re:How to waste CPU like a Professional by ai-christianson on Friday September 19, 2025 @08:01PM (#45308285)
The "stress" command is pretty good for this.
Re:How to waste CPU like a Professional by parttimenerd on Tuesday September 23, 2025 @04:40AM (#45344399)
I'm glad you like my article. I wasted far too much time researching and profiling my solutions. I'm writing a blog post every one to two weeks, so I hope you'll come back.
Re:How to waste CPU like a Professional by woah on Friday September 19, 2025 @06:58PM (#45307765)
These days it's all about wasting GPU like a professional
Re:How to waste CPU like a Professional by giveita on Friday September 19, 2025 @07:19PM (#45307955)
Stop gatekeeping. With vibe coding anyone can waste GPU.
Re:How to waste CPU like a Professional by ge96 on Friday September 19, 2025 @06:52PM (#45307714)
I have this compulsion to not close my laptop if the battery is over 90% so I would open up html5 fishbowl and crank it up to 50,000 fish per window.

I was looking for some script like count primes I could run

Re:How to waste CPU like a Professional by phi-go on Friday September 19, 2025 @09:15PM (#45308858)
Why not instead limit the charging level to 90%? Should save battery life as well.
Re:How to waste CPU like a Professional by ge96 on Friday September 19, 2025 @10:29PM (#45309669)
depends on the laptop if it has that setting or OS
Re:How to waste CPU like a Professional by phi-go on Friday September 19, 2025 @11:12PM (#45309955)
Fair enough, also thinking about it some more. If you use that option the old 90% will usually be normalized to 100% so this might not even be helpful.
Re:How to waste CPU like a Professional by ge96 on Friday September 19, 2025 @11:50PM (#45310178)
it's funny because you can buy old flagships on ebay and the battery craps out but the replacement battery you buy is counterfeit like Lenovo Carbon for example
Re:How to waste CPU like a Professional by igtztorrero on Friday September 19, 2025 @07:11PM (#45307891)
It's easy, just use Windows
Re:How to waste CPU like a Professional by pcunite on Friday September 19, 2025 @06:49PM (#45307674)
Would it use less power on ARM architecture?