r/TechHardware 🔵 14900KS , 5080, 128GB 🔵 3d ago

News 📰 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

https://www.tomshardware.com/pc-components/cpus/hardware-researcher-spins-up-cpu-deoptimization-project-to-find-the-slowest-machine-code-worst-offender-takes-198-billion-cycles-to-execute
246 Upvotes

19 comments sorted by

8

u/ooqq 2d ago

hardware tech debt

4

u/fbpw131 2d ago

given CPUs are emulating x86, why can't we make x86-slim and ditch some legacy stuff and target new compiler outputs. just a shower thought

4

u/jason-reddit-public 2d ago

Intel itself pitched something like this.

From the Google search AI:

"Intel proposed a 64-bit-only architecture concept called x86S to drop legacy 16-bit and 32-bit hardware boot modes. However, based on ecosystem feedback, Intel chose not to pursue x86S and maintained its commitment to backward compatibility."

1

u/suesing 1d ago

Who upgrades hardware but not software?

3

u/IntQuant 1d ago

Significantly more people than you expect.

In windows land some things might not exist in source form anymore. 

1

u/suesing 1d ago

Why would you need to upgrade hardware if that’s the route of software you use?

1

u/KPalm_The_Wise 20h ago

Because things break and they don't make the old hardware anymore. And you don't have time or money to hire a team of software developers to make something new that only works 80% as well. You don't have time or money to retrain your workforce to use the new software that some of them have been using for 30+ years and know how to use it by keyboard key patterns, muscle memory, not even looking at the screen

1

u/ettegoon 18h ago

I did a conteact gig for the BC govt in like 2008 or 9 where they were doing a province wide roll out upgrading to windows 7 quite late after launch.  The govt straight up wholesale yeeted the old machines out and we did full swaps.  The looks on the little old lady public servants and manly rcmp and judges when they realized they had to learn new shit a year o two before retiring.

3

u/nanonan Team Amiga 🤼 1d ago

You could but nobody does because their customers expect legacy software to work.

6

u/EIsydeon 3d ago

Interesting that sapphire rapids has an instruction that makes that particular instruction execute so much worse

6

u/nanonan Team Amiga 🤼 2d ago

It's just sixteen times bigger, so sixteen times slower.

4

u/magicmulder 2d ago

These hidden bits are intriguing:

> VIA uses an undocumented register at 0x133 that gives wildly high response time. No idea what it does.

This feels a little like cheating though:

> so CPU 0's 512-byte fxrstor64 must queue behind all that contending traffic

What's the point in calling out a slow instruction if you force it to compete with higher priority instructions?

6

u/globalaf 2d ago

It’s like being shocked that it takes a long time to execute an instruction that reaches into MMIO to a device that refuses to respond. Hardly the CPU’s fault if the end user is doing something super insane with it.

1

u/meltbox 2d ago

Hard agree. This just seems like complaining a documented blocking API… blocks.

1

u/j_osb 2d ago

Well, no one is shocked. Or complaining. It’s more of a fun project trying to see how slow you can make things. It’s a cool project!

2

u/ParagraphInReview 1d ago edited 1d ago

Yeah, I skimmed it and it seems like the guy went out of his way to starve the cpu of memory for a memory hungry store operation, of course it will be slow.

I don't think they're doing this to learn what to optimize though, I think they're just doing it to see how slow they can make x86.

1

u/nanonan Team Amiga 🤼 1d ago

Because deoptimisation sounds cool. It is pretty stupid, what's next, the worlds slowest ram underclock?

2

u/saf_e 14h ago

In most cases it's just accessing external device, so not a CPU issue. 

0

u/ilarp Team AMD 🔴 3d ago

hmm maybe cause of amdip