Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Striving for Ultimate Low Latency

code::dive conference via YouTube

Overview

Explore advanced techniques for achieving ultra-low latency in C++ programming during this comprehensive conference talk from code::dive 2017. Delve into the intricacies of high-performance computing as Mateusz Pusz, a member of the ISO C++ Committee, shares insights on optimizing code for speed-critical applications like high-frequency trading and market data processing. Learn about the characteristics of low latency software, common pitfalls to avoid, and best practices for predictable performance. Discover how to leverage C++17 features, type traits, and compile-time optimizations to minimize runtime overhead. Gain a deeper understanding of CPU data caches, memory allocation strategies, and the impact of language features like exceptions and polymorphism on latency. Through practical examples and quizzes, master the art of writing efficient C++ code that pushes the boundaries of speed and responsiveness.

Syllabus

Intro
ISO C++ COMMITTEE (WG21) STUDY GROUP 14 (5614)
LATENCY VS THROUGHPUT
WHAT DO WE MEAN BY LOW LATENCY?
WHY DO WE STRIVE FOR LOW LATENCY?
HIGH-FREQUENCY TRADING (HFT)
MARKET DATA PROCESSING
HOW FAST DO WE DO?
WHAT IF SOMETHING GOES WRONG?
C++ OFTEN NOT THE MOST IMPORTANT PART OF THE SYSTEM
SPIN, PIN, AND DROP-IN
CHARACTERISTICS OF LOW LATENCY SOFTWARE
HOW NOT TO DEVELOP SOFTWARE THAT HAVE PREDICTABLE PERFORMANCE?
THINGS TO AVOID ON THE FAST PATH
QUESTION: WHAT IS THE DIFFERENCE HERE?
KEY std::shared_ptr ISSUES
C++ EXCEPTIONS
EXCEPTION SAFETY GUARANTEES
POLYMORPHISM
MULTIPLE INHERITANCE
RUNTIME TYPE IDENTIFICATION (RTTI)
DYNAMIC MEMORY ALLOCATIONS
CUSTOM ALLOCATORS TO THE RESCUE
SMALL OBJECT OPTIMIZATION (500 / 5S / SBO)
NO DYNAMIC ALLOCATION
THINGS TO DO ON THE FAST PATH
EXAMPLE OF SAFE TO USE C++ TOOLS
DO YOU AGREE?
constexpr FUNCTION
C++20 SPOILER ALERT:-
C++17 COMPILE TIME DISPATCH
TYPE TRAITS: A NEGATIVE OVERHEAD ABSTRACTION
TYPE TRAITS: COMPILE-TIME BRANCHING
WHAT IS WRONG HERE?
QUIZ: HOW MUCH SLOWER IS THE BAD CASE?
CPU DATA CACHE
ANOTHER EXAMPLE
NAIVE OBJECTMGR IMPLEMENTATION

Taught by

code::dive conference

Reviews

Start your review of Striving for Ultimate Low Latency

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.