AI 摘要The author observed that zero-filling memory on Skylake and Ice Lake CPUs became substantially slower starting Wednesday, June 9th, and traced the cause to a new Intel microcode update (delivered via Ubuntu's intel-microcode package) that disabled the hardware zero store optimization to mitigate the CVE-2020-24512 side-channel vulnerability. This serves as a reminder that raw CPU performance can silently change due to microcode updates, so reproducible benchmarks should re-run entire suites even on identical hardware. The author also argues that stripping out optimizations vulnerable to timing side channels is an unsustainable path, and calls for a measured approach to classifying and mitigating such attacks rather than trying to eliminate every possible leak.
AI 摘要This article investigates license-based AVX-512 downclocking on Intel's new Ice Lake and Rocket Lake client chips using the avx-turbo benchmarking tool. It finds that the Ice Lake i5-1035G4 shows only a 100 MHz penalty for 512-bit instructions with one active core and no license-based downclocking in any other scenario, while the Rocket Lake i9-11900K shows none at all even with heavy AVX-512 on all eight cores. Unlike Skylake-SP, these chips no longer distinguish between light and heavy instructions, so AVX-512's frequency penalty is essentially eliminated on client parts.
AI 摘要The article introduces a taxonomy of six performance levels for concurrent operations, each roughly an order of magnitude slower than the previous, illustrated through benchmarks of safely incrementing a shared integer counter across threads on Intel and Graviton hardware. Starting at level 2 (contended atomics such as mutexes, atomic increments, and CAS), the author shows that contended access to shared cache lines sets a baseline cost of around 125 nanoseconds, while fair locks that trigger system calls on nearly every operation (level 3) are an order of magnitude slower. The article then moves on to level 4, where lock implementations force costly context switches between threads.
AI 摘要While examining a high-resolution die shot of Intel's Skylake-X CPU, the author tried to visually locate the physical register files for AVX-512 mask registers and legacy x87/MMX registers, and found that a single mystery block appeared to serve both purposes. Software microbenchmarks using the robsize tool confirmed this theory: mixing MMX and mask register instructions hit the same 128-entry resource limit as testing each alone, while mixing with SIMD or scalar instructions showed a much higher limit, proving mask and x87/MMX registers share one physical register file. This sharing saves die area and power with little practical performance impact, since obsolete x87/MMX code is unlikely to be used alongside AVX-512 mask registers.
AI 摘要This article analyzes zero-store elimination on Intel's Ice Lake architecture, finding that 256-bit stores achieve roughly 96% elimination of redundant zero stores in L3 and memory writebacks—a large improvement over both 512-bit stores (~56%) and Skylake—yielding speedups of up to ~45% in the L3 region. The author also documents a bimodal performance artifact caused by AVX-512 voltage/frequency management, where switching voltage levels temporarily reduces dispatch throughput during benchmarks. Why 256-bit stores outperform 512-bit stores in the L2 and L3 regions remains an unexplained puzzle, though the author suspects the difference in elimination rates largely accounts for it.
AI 摘要The author discovered a surprising data-dependent performance effect in memory benchmarks: filling a buffer with zeros is consistently 17-18% faster than filling it with ones when the region exceeds L2 cache, despite identical machine code. Using Intel performance counters like l2_lines_out.silent, they show the hardware detects redundant zero writes, silently evicting unmodified lines from L2 without writing them back to L3, thereby reducing cache pressure. The article walks through benchmark results across L1, L2, L3, and RAM regions to explain this 'store elimination' optimization for zero values.
AI 摘要The article is a detailed, step-by-step guide to adding comments to a static Jekyll blog using Staticman, including creating a dedicated GitHub bot account, generating access tokens, and configuring staticman.yml and _config.yml. It explains how to deploy a private Staticman API bridge to Heroku (since the public one proved unsustainable), generate an RSA keypair for encrypting secrets, and invite the bot to the blog repository. Finally, it covers enabling reCAPTCHA to prevent spam, so that reader comments are validated by the bridge and submitted as pull requests that trigger site regeneration when accepted.
AI 摘要This article investigates a surprising C++ performance quirk: filling a char array with std::fill using the integer 0 is up to 29x slower than using the char literal '\0' with gcc at -O2, because libstdc++ only applies its memset-based optimization when the iterator type exactly matches the fill value type, and 0 is deduced as int. The author traces the cause through the library's SFINAE-based implementation, shows workarounds like explicit template arguments or casts, notes edge cases involving conversion-counting types, and proposes a standard library fix. He concludes that C++ developers should keep using std::fill and modern idioms, passing a char-cast value in hot paths, rather than reaching for memset, which is rarely safe for arbitrary types.
AI 摘要This article presents a detailed, low-level investigation of AVX-512 frequency transition behavior on an Intel Skylake-X (W-2104) CPU using a custom test framework that periodically executes SIMD payloads while sampling frequency and IPC. The author finds that executing 512-bit instructions triggers a ~11 μs halted frequency transition (from the 3.2 GHz L0 license down to 2.8 GHz and back after ~650 μs), preceded by a ~9 μs 'voltage-only transition' during which instructions run at roughly 4x their normal latency. Notably, 256-bit instructions also exhibit this voltage-only slowdown, contradicting the conventional wisdom that light 256-bit instructions carry no penalty on AVX-512 hardware, while 128-bit instructions show no effect at all.
AI 摘要This article measures the previously unreported size of the AVX-512 mask register physical register file (PRF) on Skylake-X using a cache-miss probing technique, finding roughly 142 physical mask registers (134 usable for speculative state plus 8 for architectural state). Tests mixing mask register writes with general purpose or SIMD instructions show the mask PRF is not shared with those register files, though an unexplained limit around 212 in-flight instructions appears when they are mixed. The article also notes that, unlike GP and SIMD registers, mask registers do not benefit from move elimination, and discusses dependency-breaking zeroing idioms.