Presented by

  • Alexander Krizhanovsky

    Alexander Krizhanovsky
    @a_krizhanovsky
    https://tempesta-tech.com/

    Alexander is the CEO of Tempesta Technologies, Inc., and is the architect of Tempesta FW, a high performance open source Linux application delivery controller. Alexander is responsible for the design and performance of several products in the areas of network traffic processing and databases. He designed the core architecture of a Web application firewall, mentioned in the Gartner Magic Quadrant, and MariaDB temporal data tables.

Abstract

The C and C++ programming languages are well known for the performance of the generated code. However, the code is generated by a particular compiler and runs in a particular operating system and on a particular hardware. C and C++ are very fast, but there are compiler extensions, which which help to produce even faster code. Also the hardware provides extensions, which are hard to employ from C and C++ and we need Assembly to get the fastest code. In this talk we'll explore which code GCC and Clang compilers generate for several C and C++ constructions and how to make the code more efficient. We'll also dig into the x86-64-specific code optimizations. This talk covers following topics with plenty of microbenchmarks: * How x86-64 executes the code and works with memory * Several GCC and Clang compiler optimizations and extensions * When x86-64 assembly is faster and easier to use than C * Gotchas with programming for multi-core systems * Spectre mitigations in the modern compilers * Profiler guided optimizations and when it doesn't help