Author: fourstepssoftware

Performance Analysis with Perf

In this issue, we will be looking at the Linux perf tool, which can be used in various ways to do performance analysis and instrumentation of software. When collecting data via tracepoints, perf works by instrumenting running code (user- or kernel-space), causing it to emit events at predefined tracepoints in the code. In userspace programs, […]

Object Pooling

Object pooling is a technique for reusing memory in garbage-collected runtimes, reducing allocation pressure. We might wish to reuse objects because initialisation is expensive, or because we want to avoid garbage collection pauses. In garbage-collected environments, it is usual to rely on the garbage collector to recycle memory as it is used. Modern runtimes like […]

Zero-Copy Messaging

Zero-Copy Messaging is a technique that is used to improve the throughput of messaging systems. It refers to a mode in which data is presented to an application, without the need to copy into intermediate data structures. A Networked Application Consider an application that receives messages from a network socket. These messages will be encoded […]

Cache Friendly Data Structures

Before we talk about cache-friendly data structures, let’s briefly recap on what a cache is. In general computing terms, a cache is a (usually) transient store of data, that allows a program to access that data quickly. A cache is typically deployed in front of some slower storage medium. Some examples of caches are: On-disk […]