Log In
StartÂ
FreeÂ
Trial
Log In
StartÂ
FreeÂ
Trial
Back To Course Home
C++ High Performance
0% completed
Getting Started
About This Course
Course Coverage and Prerequisite
Google Test and Google Benchmark Libraries
A Brief Introduction to C++
Introduction
Why C++?
Important Features of C++
C++ Compared With Other Languages
Non-performance-Related C++ Language Features
Non-performance-Related C++ Language Features, Continued
Summary: A Brief Introduction to C++
Quiz: Introduction to C++
Essential C++ Techniques
Introduction
Automatic Type Deduction with the auto Keyword
Using auto for Variables
Const Propagation for Pointers
Move Semantics Explained
Resource Acquisition and the Rule of Five
Named Variables and rvalues
Default Move Semantics and the Rule of Zero
Applying the && Modifier to Class Member Functions
Pass by Value When Applicable
Quiz: Essential Techniques I
Designing Interfaces with Error Handling
Class Invariants
Error Handling
Recoverable Runtime Errors
Function Objects and Lambda Expressions
Initializing Variables in Capture
Mutating Lambda Member Variables
Assigning C Function Pointers to Lambdas
Implementing a Simple Button Class with std::function
Generic Lambdas
Summary: Essential C++ Techniques
Quiz: Essential Techniques II
Analyzing and Measuring Performance
Introduction
Asymptotic Complexity and Big O Notation
Time Complexity of Insertion Sort
Amortized Time Complexity
What to Measure and How?
Performance Properties
Performance Counters
Knowing Your Code and Hot Spots
Microbenchmarking
A Microbenchmark Example
Summary: Analyzing and Measuring Performance
Quiz: Analyzing and Measuring Performance
Data Structures
Introduction
The Properties of Computer Memory
The Standard Library Containers
Deque, List, forward_list, and basic_string
Associative Containers
Hash and Equals
Container Adaptors
Using Views
Some Performance Considerations
Parallel Arrays
Shrinking the Data to Iterate Through by Using Parallel Arrays
Summary: Data Structures
Quiz: Data Structures
Algorithms
Introduction
Introducing the Standard Library Algorithms
Solving Everyday Problems
More Everyday Problems
Iterators and Ranges
Iterator Categories
Features of the Standard Algorithms
Advantages of Using Algorithms in C++
Writing and Using Generic Algorithms
Best Practices
Use of Standard Algorithms Over Raw for-loops
Summary: Algorithms
Quiz: Algorithms
Ranges and Views
Introduction
The Motivation for the Ranges Library
Understanding Views from the Ranges Library
Ranges Views: Lazy, Non-Mutating Iterations with Materialization
Views in the Standard Library
Summary: Ranges and Views
Quiz: Ranges and Views
Memory Management
Introduction
Computer Memory
Process Memory
Objects in Memory
Memory Alignment
Padding
Memory Ownership
Pointers
Small Object Optimization
Custom Memory Management
Custom Memory Allocator
Using Polymorphic Memory Allocators
Summary: Memory Management
Quiz: Memory Management
Course Assessment
C++ Essentials Exam
Compile-Time Programming
Introduction
Introduction to Template Metaprogramming
Template Creation
Type Traits
Programming with Constant Expressions
The if constexpr Statement
Comparison with Runtime Polymorphism
Checking Programming Errors at Compile Time
Constraints and Concepts
Syntactic Overview of Constraints and Concepts
Real-World Examples of Metaprogramming I
Real-World Examples of Metaprogramming II
Summary: Compile-Time Programming
Quiz: Compile-Time Programming
Essential Utilities
Introduction
Representing Optional Values with std::optional
Fixed-Size Heterogenous Collections
Tuple Unrolling
The Variadic Template Parameter Pack
Dynamically Sized Heterogenous Collections
Heterogenous Collections Using Variant
Real-World Example 1
Real-World Example 2
Summary: Essential Utilities
Quiz: Essential Utilities
Proxy Objects and Lazy Evaluation
Introduction
Introducing Lazy Evaluation and Proxy Objects
Avoiding Constructing Objects Using Proxy Objects
Postponing sqrt Computations
Implementing the LengthProxy Object
Creative Operator Overloading and Proxy Objects
Summary : Proxy Objects and Lazy Evaluation
Quiz: Proxy Objects and Lazy Evaluation
Concurrency
Introduction
Understanding the Basics of Concurrency
Data Races
Concurrent Programming in C++
Advanced Concepts in Concurrent Programming
Best Practices for Error Handling in Concurrent Programming
Additional Synchronization Primitives in C++20
Signalling and Resource Counting Using Semaphores
Atomic Support in C++
Multithreaded Programming with shared_ptr and Atomic References
The C++ Memory Model
Lock-free Programming
Performance Guidelines
Summary: Concurrency
Quiz: Concurrency
Coroutines and Lazy Generators
Introduction
An Introduction to C++ Coroutines
Executing Subroutines and Coroutines on the CPU
Stackless vs. Stackful Coroutines
Coroutines in C++
A Minimal but Complete Example
Avoiding Dangling References
Generators
Solving Generator Problems
A Real-World Example Using Generators
Summary: Coroutines and Lazy Generators
Quiz: Coroutines and Lazy Generators
Asynchronous Programming with Coroutines
Introduction
Awaitable Types Revisited
Implementing a Rudimentary Task Type (Part 1)
Implementing a Rudimentary Task Type (Part 2)
Synchronously Waiting for a Task to Complete
Wrapping a Callback-Based API
A Concurrent Server Using Boost.Asio
Summary: Asynchronous Programming with Coroutines
Parallel Algorithms
Introduction
The Importance of Parallelism
Implementing Parallel std::transform()
Divide and Conquer
Implementing Parallel std::count_if() and std::copy_if()
Approach 1: Use a Synchronized Write Position
Approach 2: Split the Algorithm Into Two Parts
Parallel Standard Library Algorithms
Unsequenced Policy
Additions and Changes to Parallel Algorithms
Parallelizing an Index-Based for-Loop
Summary: Parallel Algorithms
Quiz: Parallel Algorithms
Course Assessment
C++ Advanced Concepts Exam
Quiz: Parallel Algorithms
Quiz yourself on parallel algorithms
Get hands-on with 1400+ tech skills courses.
Start Free Trial