- Добавил: literator
- Дата: Сегодня, 18:23
- Комментариев: 0

Автор: David Spuler
Издательство: Aussie AI Labs Pty Ltd
Год: 2025
Страниц: 362
Язык: английский
Формат: pdf, epub, mobi
Размер: 10.1 MB
Run faster! This book is about speeding up C++ for low latency programming in multithreaded environments and sequential code in C++ backends. Low latency programming is coding an algorithm so that it completes the task in the fastest time. In many cases, this is effectively the “user response time” or the “round-trip time” for a computation. The main uses of low latency programming include: • AI kernels — latency is the time between submitting a query, and starting to get the answer back; • Embedded devices — the system must respond quickly, in real time (e.g., autonomous self-driving cars are a large embedded device); • High-Frequency Trading (HFT) — latency is the time it takes to submit, execute, and complete a trade; • Game engines — latency is ensuring that the characters or environment moves fast enough to be responsive to user inputs and to keep up with the frame rate. Game engines have historically been written in C++, at least for all the low-level stuff dealing with frame rates and 3D animation. Similarly, high-frequency trading is usually running in C++ at the bottom level. You can also use C, which is the longstanding precursor to C++. The C programming language is obviously fast, as that was its key design point. C is not necessarily any faster than C++, so if you used only a C-like subset of C++, the two would be the same speed.