<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cache on Jasper</title><link>https://jasper-aa64.github.io/tags/cache/</link><description>Recent content in Cache on Jasper</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 20 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://jasper-aa64.github.io/tags/cache/index.xml" rel="self" type="application/rss+xml"/><item><title>Low-Latency Trading — A Cache Case Study: Repricing 64 Options per Tick</title><link>https://jasper-aa64.github.io/posts/low-latency-cache-case-study/</link><pubDate>Tue, 20 Oct 2026 00:00:00 +0000</pubDate><guid>https://jasper-aa64.github.io/posts/low-latency-cache-case-study/</guid><description>One tick touches 140 cache lines, and most of the time goes into waiting for them. None of the four steps changes the computation; they change when data arrives, where it lands and who holds it: put the misses in flight together, ask for the next batch early, hand back lines that are dead after one read, read one line less across the handoff, and leave the lines the other core will read in L3.</description></item><item><title>Trading System Notes #6: Alignment, Layout, and Cache and DRAM Geometry</title><link>https://jasper-aa64.github.io/posts/alignment-layout-cache-dram-geometry/</link><pubDate>Sun, 04 Oct 2026 00:00:00 +0000</pubDate><guid>https://jasper-aa64.github.io/posts/alignment-layout-cache-dram-geometry/</guid><description>An access never pays for bytes; it pays for cache lines, and the address decides which lines, which cache set they compete for, and which DRAM channel and bank they live on. Part 1 is alignment: why a double aligned to 8 never straddles a line, why padding exists for arrays, alignas on a type versus a member, and how to get 64-byte and 2 MiB alignment on the heap. Part 2 is layout: lines per access, AoS versus SoA, and denormalization as a way to cut a dependency chain. Part 3 goes into the hardware: L1 picks a set from address bits 6–11, so data 4 KiB apart competes for 8 slots however empty the cache is (measured on an M1); a DRAM bank has one row buffer, 14 ns on a hit and 41 ns on a conflict; a column walk loses at five layers; refresh adds a P99 tail software can&amp;rsquo;t remove; and channels balance only when the hot stride is coprime with the channel count.</description></item></channel></rss>