Urgent.News

the world's headlines, one feed

Editions

Tech

Hardware researcher spins up 'CPU deoptimization' project to find the slowest single x86 instruction, creates hall of shame — worst offender takes 198 billion cycles spanning 62 seconds to execute

One hardware researcher, Christopher Domas (@xoreaxeaxeax on GitHub), is taking a different approach with the CPU Deoptimization leaderboard, which looks not to make Assembly instructions run as fast as possible, but as slow as possible to find the single instruction with the highest latency.

Hardware researcher spins up 'CPU deoptimization' project to find the slowest single x86 instruction, creates hall of shame — worst offender takes 198 billion cycles spanning 62 seconds to execute

Hardware researcher Christopher Domas has embarked on a project to identify the slowest single x86 instruction, creating a hall of shame showcasing the worst offenders. The winner of this endeavor is the fxrstor64 instruction, which took an astonishing 62 seconds, or over 198 billion cycles, to complete its task. Domas achieved this by first locating a high-latency area in the internal PCIe fabric, then forcing the CPU to load a 512-byte state from Memory-Mapped I/O, essentially processing all those 512 bytes at their slowest possible pace.

To further extend the execution time, he depleted the fabric while the load was in flight, overwhelming the CPU's PCIe root complex and causing the state restore to queue behind frivolous read operations. The next step in the project is to employ the AMX instructions available in Intel's Sapphire Rapids, which could potentially cause the instruction to hang for more than 1 trillion cycles.

Domas has also planned ARM and RISC-V leaderboards, and the x86 leaderboard is now available on GitHub. The project aims to shed light on the slowest machine instructions, rather than optimizing for speed, and the rankings are based on how you manipulate the instruction rather than the instruction itself.

Written by urgent.news from Tom's Hardware's reporting — not their text. Machine-written — it may contain errors, so check the original before relying on it.

Read the original at tomshardware.com →

More in Tech

One Event-Loop Turn, One False Redis Capacity Error

This is a submission for DEV's Summer Bug Smash: Clear the Lineup powered by Sentry . Project Overview redis-py is the Python client for Redis.

  • Event loop race condition caused false Redis capacity error
  • Connection slot missing from in-use set and free queue
  • Fix ensures closed connections return to free queue immediately

Scheduling concurrency

Have been trying to look at 3 different languages: Go, Kotlin, Elixir/Erlang mostly to understand their concurrency models. This article concerns mostly about Go's preemptive scheduling.

  • Go 1.14 introduced signal-based non-cooperative preemption mechanism
  • SIGURG signal chosen for preemption due to specific criteria
  • Preemption eliminates need for checks, mirrors OS thread switching

🛻CSS Art: Smoothie Food Truck

This is a submission for Frontend Challenge - Comfort Food Edition, CSS Art . Inspiration 💠I was not sure I was going to enter this challenge at first, because I was not feeling inspired.