Leanpub Header

Skip to main content

Filters

Category: "Performance Engineering"

Performance Engineering

New to Software Engineering? Read the Software Engineering article

  1. Building High-Performance Network Stacks
    Building High-Performance Network Stacks
    From First Principles to Production-Grade Systems
    Steve Publications

    What does it take to build a network stack that can handle millions of packets per second? This book takes you from the fundamentals of networking to the inner workings of Linux, showing how protocols, kernel internals and low-level optimization techniques come together in real-world systems. Learn by building, measuring and tuning code in C and Rust.

  2. Deterministic Pricing Engines in C++
    Deterministic Pricing Engines in C++
    Monte Carlo Simulation, Finite Difference Solvers and Real-Time Greeks for Production Trading Systems
    Weston Ashgrove

    Your Greeks change when you move from 32 cores to 64. Your prices drift after a compiler upgrade. Neither is noise. Both are bugs, and this book shows how to build C++ pricing engines that cannot have them.

  3. Production CMake for C++ Engineers
    Production CMake for C++ Engineers
    Fixing Dependency Hell and Slow Builds with Modern Targets, Presets and Modules
    Weston Ashgrove

    The release passed CI and crashed on the first machine that ran it. The build got slower after the team doubled its cores. A dependency nobody touched stopped configuring on Monday morning.None of these were code bugs. They were build bugs, and most C++ teams have them without knowing it.Production CMake for C++ Engineers is a field guide to finding and fixing them: dependency hell, slow builds, leaked flags, broken packages, and CI that can’t reproduce itself. Every fix comes with a way to prove it worked.

  4. Precision Time for Trading Systems in C++
    Precision Time for Trading Systems in C++
    PTP, Hardware Timestamping and Clock Synchronization for Nanosecond Event Ordering.
    Weston Ashgrove

    Your markouts say the strategy has edge. Your latency dashboard says you’re fast. Your backtest agrees with both.Then two hosts turn out to disagree by four microseconds, and none of those numbers mean what you thought.Precision Time for Trading Systems in C++ shows you how to make every timestamp on your desk defensible: PTP, hardware timestamping, TSC calibration, and nanosecond event ordering, in production C++. You’ll know what happened first, how long it took, and how you can prove it.If your edge is measured in microseconds, your clocks are part of your strategy.

  5. Lock-Free C++ in Production
    Lock-Free C++ in Production
    Mastering the Memory Model with Hazard Pointers and Epoch-Based Reclamation
    Weston Ashgrove

    Your lock-free queue passed every test. It ran clean under ThreadSanitizer for a year. Then it shipped to ARM and started corrupting data, without a single crash. Lock-Free C++ in Production shows you why, and how to make sure it never happens to your code.

  6. Vectorized C++
    Vectorized C++
    SIMD Intrinsics, AVX-512, ARM NEON, and std::simd — From Data Layout and Hardware Dispatch to Production Deployment
    Weston Ashgrove

    Your CPU has been waiting.Every numeric loop you have ever shipped processed one value at a time on hardware that was built to process sixteen simultaneously. The gap between what your code does and what the silicon is capable of is not a compiler limitation or a language restriction. It is a knowledge gap, and it has a precise cost you can measure in cycles per element.This book closes it.You will learn to read hardware the way the processor reads it: in lanes, in registers, in parallel. You will understand why your data layout is the first performance decision and the last one most engineers make. You will write branchless conditional logic that executes at full vector throughput, navigate AVX-512’s predication model without triggering the frequency trap that makes wider vectors slower, and build ARM NEON kernels that exploit interleaved memory instructions x86 has no equivalent for.By the time you reach the final chapter, you will have the complete toolkit: a portable abstraction layer that compiles to native instructions with zero overhead, a compiler collaboration discipline that turns the auto-vectorizer from an unreliable guess into a predictable collaborator, a benchmarking methodology that measures real throughput instead of measuring the speed of nothing, and a fat binary deployment architecture that ships the right implementation to every machine in your fleet without a separate binary per hardware class.The hardware is fast. It has always been fast. This book teaches you to use it.

  7. CPU Performance Engineering
    CPU Performance Engineering
    From Architecture to Optimization - A Practical Guide to Making Software Faster
    Steve Publications

    What really makes software fast? This book takes you inside the modern CPU to show what happens to your code at the hardware level. Learn how to measure performance, find bottlenecks and turn slow code into faster code using practical techniques, real tools and real hardware.

  8. Low-Latency Execution  Algorithms in C++
    Low-Latency Execution Algorithms in C++
    Smart Order Routing, TWAP/VWAP Scheduling and Queue-Aware Order Placement.
    Weston Ashgrove

    Your VWAP report looks fine. Your markouts don’t. Every slice filled on schedule, but the market had learned the algorithm’s rhythm long before the order finished. Low-Latency Execution Algorithms in C++ walks through building a production execution engine in modern C++: TWAP, VWAP and implementation shortfall schedules, queue-aware placement, smart order routing and the testing harness that proves it all works. Every chapter comes with compilable code and a running Slippage and Latency Ledger.

  9. High-Performance .NET: From JIT to Hardware
    High-Performance .NET: From JIT to Hardware
    A Systems-Level Guide to Writing Fast .NET Applications
    Steve Publications

    Go beyond writing code that works. Learn what really happens inside .NET, from C# and the JIT to memory, CPU execution and the operating system. This practical guide shows experienced developers how to measure performance, find real bottlenecks and make targeted improvements that hold up in production.

  10. Concurrent Programming in Java
    Concurrent Programming in Java
    From Traditional Threads to Project Loom
    Florin Radu

    Master the ideas behind Java concurrency, from threads, race conditions, and synchronization to CompletableFuture, virtual threads, and structured concurrency. With practical patterns, runnable examples, and a companion GitHub repository, this book helps you move from understanding concurrency to applying it in real programs.

  11. Bare-Metal Performance Engineering in C++
    Bare-Metal Performance Engineering in C++
    Profiling with perf and Top-Down Microarchitecture Analysis to Build Benchmarks That Don’t Lie
    Weston Ashgrove

    A hash function benchmarked at four times faster ships, and the service doesn’t move, because the compiler deleted the work being measured. Most C++ performance work fails like this: confident numbers, wrong conclusions. Bare-Metal Performance Engineering in C++ follows one real request-handling service from 50,000 cycles per request down to about a quarter of that, showing every measurement, every bottleneck, and every fix along the way.

  12. Bare-Metal Network Programming in C++
    Bare-Metal Network Programming in C++
    Building Zero-Copy io_uring Servers with Coroutine Scheduling and Registered Buffer Pools
    Weston Ashgrove

    Your load test says p99 is fine. Production says otherwise. Bare-Metal Network Programming in C++ shows you where the time actually goes, and how to take it back.

  13. Database Performance Engineering

    What really happens inside a database when queries run, data is stored and performance starts to suffer? This book takes you behind the scenes of SQLite, PostgreSQL and modern storage engines, showing how they work through real code, practical examples and performance analysis. Learn to find bottlenecks, make better design decisions and build faster, more reliable applications.

  14. The Performance Engineer's Guide to Modern Computer Architecture
    The Performance Engineer's Guide to Modern Computer Architecture
    Understanding, Analyzing, Measuring and Optimizing Computing Systems
    Steve Publications

    Modern computer systems are complex, and getting the best performance out of them takes more than writing efficient code. This book takes you inside the hardware, from processor pipelines and cache hierarchies to parallel computing and acceleration. Learn how to measure, understand and eliminate performance bottlenecks with practical techniques grounded in real-world engineering.

  15. A Practical Guide to Pruning Experts in Mixture-of-Experts (MoE) Models
    A Practical Guide to Pruning Experts in Mixture-of-Experts (MoE) Models
    From First Principles to Production Deployment
    Steve Publications

    What if you could make massive Mixture-of-Experts models smaller without retraining them from scratch? This book takes you from the fundamentals of expert pruning to practical implementation, covering proven methods, working code and real-world deployment challenges. Learn how to identify redundant experts, preserve model performance and build pruning solutions that work in production.