Get the latest tech news

How to waste CPU like a Professional


In this week's blog post, you'll learn seven different ways to waste a specific amount of CPU-time. Number seven will surprise you.

As a short backstory, my profiler needed a test to check that the queue size of the sampler really increased dynamically (see Java 25’s new CPU-Time Profiler: Queue Sizing (3)), so I needed a way to let a thread spend a pre-defined number of seconds running natively on the CPU. After all the previous solutions, you might ask yourself: Couldn’t the operating system just signal me after a fixed number of seconds, so my user-land program can focus on the most important task of idly looping? Palace Church in Rastatt This blog post is part of my work in the SapMachine team at SAP, making profiling easier for everyone.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of cpu

cpu

Photo of Professional

Professional

Related news:

News photo

Fairchild PPS-25: 4-bit CPU for 25-digit precision

News photo

Linux's New "Sheaves" Per-CPU Caching Layer Showing Massive Wins For AMD Performance

News photo

Weird CPU architectures, the MOV only CPU (2020)