compiler-optimization

Tag

Cards List
#compiler-optimization

Spooky C++

Lobsters Hottest ↗ · 2026-11-01 Cached

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.

0 favorites 0 likes
#compiler-optimization

Beating the compiler at signed 32-bit division

Lobsters Hottest ↗ · 2026-11-01 Cached

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.

0 favorites 0 likes
#compiler-optimization

Effective Type: Part 1

Lobsters Hottest ↗ · 2026-10-31 Cached

Martin Uecker 发布博客系列第一部分,深入解析 C 语言的 effective type(有效类型)规则如何支撑基于类型的别名分析(TBAA),并说明编译器如何利用这些规则进行 UB 相关优化。

0 favorites 0 likes
#compiler-optimization

Speeding up GPU copies by permuting iteration spaces, or, optimising the identity function

Lobsters Hottest ↗ · 2026-10-31 Cached

Futhark 博客介绍了一种通过利用运行时数组布局信息、置换迭代空间来加速 GPU 大块数据拷贝的优化技术,该方法基于线性内存访问描述符(LMADs),对部分程序有小幅性能提升。

0 favorites 0 likes
#compiler-optimization

The Shift of Theseus — Toy Bit Provenance Abstract Domain

Lobsters Hottest ↗ · 2026-10-27 Cached

一篇 PyPy 博文介绍了一个玩具级的 bit provenance 抽象域,通过追踪 SSA 变量中每一位的来源来识别位操作序列中的等价关系,从而实现诸如 `result = a & c` 简化为 `result = a` 的优化,并在 Pydrofoil 和 PyPy 中进行了评估。

0 favorites 0 likes
#compiler-optimization

A faster way to compute signed 64-bit floor division by constants

Lobsters Hottest ↗ · 2026-10-26 Cached

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.

0 favorites 0 likes
#compiler-optimization

Using a lookup-table to correct an approximation

Lobsters Hottest ↗ · 2026-10-22 Cached

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.

0 favorites 0 likes
#compiler-optimization

@PyTorch: Squeeze extra performance out of GPU kernels that are already autotuned to the limit by diving below the kernel level i…

X AI KOLs Following ↗ · 2026-10-19 Cached

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.

0 favorites 0 likes
#compiler-optimization

Where Does the Performance Go? Understanding and Recovering Performance Regressions in C-to-Rust Translation

arXiv cs.AI ↗ · 2026-10-19 Cached

该论文研究了 c2rust 自动 C 到 Rust 翻译中的性能回退问题,分析出九类常见性能问题,并提出基于 LLM 规则引导的 PerfR 方法,在多个项目上恢复甚至超越原始 C 性能。

0 favorites 0 likes
#compiler-optimization

Superoptimizing an FPU Emulator

Hacker News Top ↗ · 2026-10-16 Cached

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.

0 favorites 0 likes
#compiler-optimization

How to Train Your Little Dragon: Teaching a Small Language Model to Construct and Refine GPU Optimization Scripts

arXiv cs.LG ↗ · 2026-10-16 Cached

UC San Diego 与 Amazon Annapurna Labs 提出 'How to Train Your Little Dragon' 训练方法,通过监督微调与强化学习使一个 8B 小模型学会构建和改进 GPU 优化脚本,在正确率和内核性能上超越多个万亿参数级前沿 LLM。

0 favorites 0 likes
#compiler-optimization

PGO or not PGO this is the dilemma. Step 2

Hacker News Top ↗ · 2026-10-14 Cached

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.

0 favorites 0 likes
#compiler-optimization

Zeroization, part 1: Wiping can make things worse

Lobsters Hottest ↗ · 2026-10-07 Cached

技术博客文章探讨了在C代码中对秘密数据进行零化(memset/secure_zero)的常见做法为何可能适得其反:编译器优化会删除memset,而volatile字节写入或不透明的wipe函数反而可能引入新的秘密副本并让其残留在寄存器中。

0 favorites 0 likes
#compiler-optimization

Hacking the Go compiler to efficiently map IPv4 to IPv6

Lobsters Hottest ↗ · 2026-10-04 Cached

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.

0 favorites 0 likes
#compiler-optimization

Customization: Optimizing Compiler Technology for SELF, a Dynamically-Typed Object-Oriented Programming Language (1989)

Lobsters Hottest ↗ · 2026-10-03

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.

0 favorites 0 likes
#compiler-optimization

Beating the Compiler

Hacker News Top ↗ · 2026-10-01 Cached

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.

0 favorites 0 likes
#compiler-optimization

Remembering Johannes Doerfert

Lobsters Hottest ↗ · 2026-09-25 Cached

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.

0 favorites 0 likes
#compiler-optimization

Automated optimization of a molecular simulation program

Hacker News Top ↗ · 2026-09-22 Cached

This article describes the automated optimization of the MBX molecular simulation program using compiler vectorization and parallel computation to enhance performance through SIMD instructions.

0 favorites 0 likes
#compiler-optimization

Type Punning in C and C++

Hacker News Top ↗ · 2026-09-22 Cached

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.

0 favorites 0 likes
#compiler-optimization

Compiler-style optimization for drawing via Skia

Hacker News Top ↗ · 2026-09-17 Cached

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.

0 favorites 0 likes
Next →
← Back to home

Submit Feedback