Matt coding outside London (@CodingInLondon) header
Matt coding outside London (@CodingInLondon) profile picture

Software engineer / Transformation consultant / Writing about topics not qualified about: usage of excess energy.

Singapore
Joined June 2009
I just think it’s cool to have full control over the hardware of a box you rent online by the hour. Full spec of what I rented last week, tweaks included. #lowlatency
You can rent an Intel Xeon for a few cents an hour and pay with sats. When you’re done, just terminate it and they stop billing. They give you access to the whole hardware: core isolation, thread pinning, turbo boost off, TMA hardware counters.
1
13
You can rent an Intel Xeon for a few cents an hour and pay with sats. When you’re done, just terminate it and they stop billing. They give you access to the whole hardware: core isolation, thread pinning, turbo boost off, TMA hardware counters.
1
42
Impact of using non aligned shared variables on median push to pop latency is at least 12%. Impact on p99 is not spectacular. Would be interesting to prove that false sharing was actually happening between the 2 cores. #lowlatency
Measured the impact of false sharing on latency inside an SPSC. With and without alignas(64). Not aligning shared variables may cause them to share an L1 cache line, which generates unnecessary cache coherence traffic between cores. Findings coming up…
1
1
36
What is the most expensive arithmetic operation for a CPU? A division. It takes ~10-30 cycles when a subtraction only takes 1. Modified a running sum to replace a division on every tick with a simple subtraction. Benchmarked on an isolated core. Gain: ~36% #lowlatency
29
p99.99 went down in all tests. max latency was slashed. #lowlatency
12
“Flash was born because the tablet failed and it died because the tablet returned” Remember when you couldn’t play video in a browser without it? Amazing story. youtu.be/UWuB74Gz510
43
New low-latency C++ home lab: - a mobile dev box: Ubuntu VM running on a MacBook - a fixed “production” box: bare metal Linux on a refurbished 2013 MacBook with Intel chip for deep access to perf stat measurements and hardware tweaks. primal.net/e/nevent1qqsrzfma…
40
Recycling ♻️: installed Ubuntu on my MacBook pro 2013. Removed the swollen battery before it explodes and burns my apartment. The objective? Have an Intel-based bare metal environment rather than a VM, so that I can practice perf stat, hardware counters, TMA and flame graphs.
22
We don't need to use virtual functions when the complete set of possible classes is known at compile time. So those clever interface-based calls that used to give us a boner in regular C++ or C# are not for a low latency hot path context. youtu.be/NH1Tta7purM
36
Very good material packed with nuanced technical approaches to make C++ systems a little bit faster (and how to measure it) youtu.be/sX2nF1fW7kI
30
Laurie Kirk invents a word to describe the situations where the programmer knows something the operating system doesn’t. It’s really what low-latency coding is all about: have the OS stop guessing and trying to help. youtu.be/ScwvInRZdKE
64