硬件研究人员 Christopher Domas 在 GitHub 发起了 CPU 反优化项目,旨在寻找执行延迟最高的 x86 指令[1]。该项目通过构造特殊运行环境,利用内存映射 I/O 和 PCIe 互连机制来延长指令执行时间[1]。
在这一项目中,x86 架构最慢指令的记录由 fxrstor64 所创造[1]。这条指令的单次执行耗时约 62 秒,相当于 1980 亿个 CPU 周期[1]。该指令涉及的状态恢复操作所需的 512 字节内存加载部分耗时约 740 亿个 CPU 周期,超过 23 秒[1]。Christopher Domas 为此项目开发了名为 mmiotic 的工具用于测试[1]。
值得注意的是,英特尔 Sapphire Rapids 处理器的 AMX 指令可能让单条指令执行时间超过 1 万亿个 CPU 周期[1]。该项目还计划为 ARM 和 RISC-V 架构建立对应的排行榜[1]。
Hardware researcher Christopher Domas has launched a CPU de-optimization project on GitHub to identify x86 instructions with the highest execution latency.[1] The project has uncovered that fxrstor64 holds the record as the slowest x86 instruction, requiring approximately 62 seconds for a single execution—equivalent to 198 billion CPU cycles.[1]
The initiative employs specially constructed runtime environments that leverage memory-mapped I/O and PCIe interconnect mechanisms to extend instruction execution time.[1] According to the findings, the state restoration operation requiring 512 bytes of memory loading consumes approximately 74 billion CPU cycles, exceeding 23 seconds.[1] Domas developed the mmiotic tool to facilitate these measurements and testing procedures.[1]
Looking ahead, the research suggests that Intel's Sapphire Rapids processor's AMX instructions could potentially push single instruction execution time beyond 1 trillion CPU cycles.[1] The project plans to establish corresponding performance rankings for ARM and RISC-V architectures as well.[1]