Writing Quick Code in C++, Quickly

Day 1 - Contemporary computer architectures make it possible for slow code to work reasonably well. They also make it difficult to write really fast code that exploits the CPU amenities to their fullest. And the smart money is on fast code—we're running out of cool things to do with slow code, and the battle will be on doing really interesting and challenging things at the envelope of what the computing fabric endures. So how to write quick code, quickly? Turns out it's quite difficult because today's complex architectures defy simple rules to be applied everywhere. It is not uncommon that innocuous high-level artifacts have a surprisingly high impact on the bottom line of an application's run time (and power consumed). This talk is an attempt to set forth a few pieces of tactical advice for writing quick code in C++. Applying these is not guaranteed to produce optimal code, but is likely to put it reasonably within the ballpark. These tips are based on practical experience but also motivated by the inner workings of modern CPUs.

Related Talks

Don't Help the Compiler

Don't Help the CompilerDay 1 - C++ has powerful rules for dealing with low-level program structure. Before a program is ever executed, the compiler determines valuable information about every expression in the source code. The compiler understands exactly how long each object's resources will be needed (lifetime), whether each expression refers ...

Why C++ Sails When the Vasa Sank

Why C++ Sails When the Vasa SankSource: http://tech.yandex.ru/events/cpp-party/june-msk/talks/1954/ I especially like 36:58 The Vasa was a 17th-century Swedish warship which suffered such feature creep during construction that it sank shortly after leaving the harbour on its maiden voyage. In the early 1990s, the C++ standardisation committee adopted the Vasa as a cautionary tale, discouraging prospective language extensions with ...