Skip to Content
Advanced C++
book

Advanced C++

by Gazihan Alankus, Olena Lizina, Rakesh Mane, Vivek Nagarajan, Brian Price
October 2019
Intermediate to advanced
762 pages
14h 7m
English
Packt Publishing
Content preview from Advanced C++

8. Need for Speed – Performance and Optimization

Learning Objectives

By the end of this chapter, you will be able to:

  • Time your code performance manually
  • Use source code instrumentation to measure code execution time
  • Use the perf tool to analyze program performance
  • Use the godbolt compiler explorer tool to analyze machine code generated by a compiler
  • Use compiler flags to generate better code
  • Apply code idioms that result in performance
  • Write cache-friendly code
  • Apply algorithm-level optimizations to real-world problems

In this chapter, we will explore concepts that will allow us to write fast code in general and several practical techniques that apply to C++ in particular.

Introduction

In today's world of extremely large and complicated ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Advanced C and C++ Compiling

Advanced C and C++ Compiling

Milan Stevanovic
Mastering C++ Programming

Mastering C++ Programming

Jeganathan Swaminathan
Expert C++

Expert C++

Vardan Grigoryan, Shunguang Wu
C++ High Performance

C++ High Performance

Viktor Sehr, Björn Andrist

Publisher Resources

ISBN: 9781838821135Supplemental Content