Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Advanced C++

You're reading from  Advanced C++

Product type Book
Published in Oct 2019
Publisher
ISBN-13 9781838821135
Pages 762 pages
Edition 1st Edition
Languages
Authors (5):
Gazihan Alankus Gazihan Alankus
Profile icon Gazihan Alankus
Olena Lizina Olena Lizina
Profile icon Olena Lizina
Rakesh Mane Rakesh Mane
Profile icon Rakesh Mane
Vivek Nagarajan Vivek Nagarajan
Profile icon Vivek Nagarajan
Brian Price Brian Price
Profile icon Brian Price
View More author details

Table of Contents (11) Chapters

About the Book 1. Anatomy of Portable C++ Software 2A. No Ducks Allowed – Types and Deduction 2B. No Ducks Allowed – Templates and Deduction 3. No Leaks Allowed - Exceptions and Resources 4. Separation of Concerns - Software Architecture, Functions, and Variadic Templates 5. The Philosophers' Dinner – Threads and Concurrency 6. Streams and I/O 7. Everybody Falls, It's How You Get Back Up – Testing and Debugging 8. Need for Speed – Performance and Optimization 1. Appendix

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.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Advanced C++
Published in: Oct 2019 Publisher: ISBN-13: 9781838821135
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}