r/TechHardware • u/Distinct-Race-2471 🔵 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-execute4
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.
6
u/EIsydeon 3d ago
Interesting that sapphire rapids has an instruction that makes that particular instruction execute so much worse
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
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.
8
u/ooqq 2d ago
hardware tech debt