Tag
A Halloween-themed blog post demonstrating a spooky C++ bug: comparing a std::string_view from a literal to a std::string grants 'root permissions' only when compiled with -O2 due to undefined behavior, reproducible with both Clang 19 and GCC 14 across C++17/20/23.
Lemire shows how to beat compilers at signed 32-bit integer division by constant using a 64-bit 33-bit multiplier trick, avoiding the correction term GCC/LLVM emit, with benchmark latencies across modern CPUs.
Martin Uecker 发布博客系列第一部分,深入解析 C 语言的 effective type(有效类型)规则如何支撑基于类型的别名分析(TBAA),并说明编译器如何利用这些规则进行 UB 相关优化。
Futhark 博客介绍了一种通过利用运行时数组布局信息、置换迭代空间来加速 GPU 大块数据拷贝的优化技术,该方法基于线性内存访问描述符(LMADs),对部分程序有小幅性能提升。
一篇 PyPy 博文介绍了一个玩具级的 bit provenance 抽象域,通过追踪 SSA 变量中每一位的来源来识别位操作序列中的等价关系,从而实现诸如 `result = a & c` 简化为 `result = a` 的优化,并在 Pydrofoil 和 PyPy 中进行了评估。
A blog post introducing a new fast algorithm for signed 64-bit floor division by compile-time constants, benchmarked 10–20% faster than existing approaches on ARM and ~5–10% faster on most x86 cases, along with a copy-paste code generator and a critique of how compilers and libraries handle floor division.
A Corsix.org blog post explores reducing binary size for enum-to-string conversion functions by replacing pointer tables with compact offset tables, and further compressing those offsets using a linear approximation corrected by a small lookup table of residuals.
PyTorch Helion now integrates NVIDIA CompileIQ's Advanced Control Files into its autotuner, enabling joint search over kernel configurations and low-level ptxas compiler controls to extract last-mile performance from already autotuned GPU kernels.
该论文研究了 c2rust 自动 C 到 Rust 翻译中的性能回退问题,分析出九类常见性能问题,并提出基于 LLM 规则引导的 PerfR 方法,在多个项目上恢复甚至超越原始 C 性能。
A blog post describing how the author brute-force searched over short formula space to superoptimize a floating-point lowest-set-bit computation, eliminating a branchy special case for powers of two in about 4 minutes of search time.
UC San Diego 与 Amazon Annapurna Labs 提出 'How to Train Your Little Dragon' 训练方法,通过监督微调与强化学习使一个 8B 小模型学会构建和改进 GPU 优化脚本,在正确率和内核性能上超越多个万亿参数级前沿 LLM。
Second post in a three-part Percona series explaining how Profile-Guided Optimization (PGO) works: instrumented two-pass builds, per-edge counter collection, and how the compiler uses that data to drive inlining, branch layout, hot/cold function splitting, and instruction-cache locality.
技术博客文章探讨了在C代码中对秘密数据进行零化(memset/secure_zero)的常见做法为何可能适得其反:编译器优化会删除memset,而volatile字节写入或不透明的wipe函数反而可能引入新的秘密副本并让其残留在寄存器中。
Vincent Bernat explores how to efficiently map IPv4 addresses to IPv6 in Go's netip.Addr, comparing a standard library addition, an unsafe helper, and hacking the Go compiler to optimize the netip.AddrFrom16(ip.As16()) pattern that maintainers prefer.
1989 paper on the Self language compiler introducing procedure customization by receiver type, speculative type predictions with runtime tests, call splitting, and aggressive inlining — techniques that doubled the performance of dynamically-typed OO languages and later informed modern JITs.
Matt Keeter investigates the rumor that compilers generate poor code for interpreters, by disassembling and hand-tuning the generated assembly for his Rust-based interpreter of the Uxn CPU, comparing it against the reference implementation and assembly-written interpreters.
A tribute to Johannes Doerfert, highlighting his significant contributions to the LLVM compiler project, including work on the Attributor framework, OpenMP offloading, and polyhedral optimization, and his impact on the open-source community.
This article describes the automated optimization of the MBX molecular simulation program using compiler vectorization and parallel computation to enhance performance through SIMD instructions.
This article explains type punning in C and C++, warning about the undefined behavior of pointer casts due to strict aliasing rules and recommending unions or memcpy for safe type punning.
This paper introduces μSkia, a formal semantics for the Skia 2D graphics library, and develops an optimizer that achieves 18.7% speedup on real-world Skia programs from top websites, verified using Lean.