Overview
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