Erik Rigtorp

Posts

Optimizing a ring buffer for throughput

In this article I will take a look at the classic concurrent ring buffer and how it can be optimized to increase throughput. Read more...

Using huge pages on Linux

In this article I will explain when and how to use huge pages. Read more...

Fuzzing floating point code

In this article I demonstrate how to fuzz test floating point code using libFuzzer. Read more...

Generating std::ostream &operator<< for C++ enums and structs using libClang

In this article I describe how to automatically generate implementations for std::ostream &operator<< for enums and structs from C++ source code using LibClang. Read more...

Tips for using the sockets API

My notes on common gotchas and usage tips for usign the POSIX sockets API (also known as Berkeley sockets or BSD sockets). Read more...

Uses of immediately invoked function expressions (IIFE) in C++

The immediately invoked function expression (IIFE) is a concept that has been independently discovered multiple times and applicable to multiple programming languages. Read more...

Latency implications of virtual memory

This is a short guide describing the latency implications of the virtual memory abstraction. Read more...

Aligned AVX loads and stores are atomic

On the latest CPU microarchitectures (Skylake and Zen 2) AVX/AVX2 128b/256b aligned loads and stores are atomic even though Intel and AMD officially doesn’t guarantee this. Read more...

Correctly implementing a spinlock in C++

I’ve seen a lot of poorly implemented spinlocks floating around the internet. Read more...

Low latency tuning guide

This guide describes how to tune your AMD64/x86_64 hardware and Linux system for running real-time or low latency workloads. Read more...

1 of 2 Next Page