Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

compiler idiom

A pattern of instructions that a compiler always uses for one C++ construct, so recognizing the pattern tells you the construct.

A compiler idiom is a recurring instruction sequence characteristic of a source construct under a given compiler and optimization level: rotated loops, bounds check plus jump table for switch, vptr load plus indirect call for a virtual call, multiply-high plus shifts for division by a constant, setcc/cset for a bool, cmov/csel for a select, rep movsb or vector moves for an inlined memcpy.

Read the full section →