<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Shai Asher</title><link>https://slow-is-smooth.io/</link><description>Recent content on Shai Asher</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sun, 06 Sep 2026 09:00:00 +0300</lastBuildDate><atom:link href="https://slow-is-smooth.io/index.xml" rel="self" type="application/rss+xml"/><item><title>The cache was working perfectly. That was the problem.</title><link>https://slow-is-smooth.io/blog/cache-stampede-war-story/</link><pubDate>Sun, 06 Sep 2026 09:00:00 +0300</pubDate><guid>https://slow-is-smooth.io/blog/cache-stampede-war-story/</guid><description>&lt;h2 id="0247"&gt;02:47&lt;/h2&gt;&#10;&lt;p&gt;Falafel Corp runs a one-person on-call rotation, which is a staffing decision that looks&#10;efficient right up until the night it isn&amp;rsquo;t. Tonight it is your turn, and the phone goes off&#10;on the nightstand, and you are awake before you are conscious.&lt;/p&gt;</description></item><item><title>The Bloom Filter Optimization Saga: The "Benign" Read That Wasn't</title><link>https://slow-is-smooth.io/blog/the-bloom-filter-optimization-saga-the-benign-read-that-wasnt/</link><pubDate>Sat, 05 Sep 2026 14:46:43 +0000</pubDate><guid>https://slow-is-smooth.io/blog/the-bloom-filter-optimization-saga-the-benign-read-that-wasnt/</guid><description>&lt;h2 id="a-go-concurrency-and-memory-model-deep-dive"&gt;A Go Concurrency And Memory Model Deep Dive&lt;/h2&gt;&#10;&lt;p&gt;&lt;img src="https://slow-is-smooth.io/images/the-bloom-filter-optimization-saga-the-benign-read-that-wasnt/from-the-trenches-image.png" alt=""&gt;&lt;/p&gt;&#10;&lt;p&gt;In software engineering, some of the most insidious bugs are the ones that hide behind correct-looking code. This is a war story about a data race that slipped into a highly optimized, &amp;ldquo;thread-safe&amp;rdquo; Go Bloom filter. It’s a practical lesson in humility and a reminder that when it comes to concurrency, the Go race detector is the ultimate arbiter of truth.&lt;/p&gt;</description></item><item><title>Finding Errors in Log Streams</title><link>https://slow-is-smooth.io/blog/finding-errors-in-log-streams/</link><pubDate>Sat, 05 Sep 2026 12:00:00 +0300</pubDate><guid>https://slow-is-smooth.io/blog/finding-errors-in-log-streams/</guid><description>&lt;p&gt;Two questions come up constantly when processing large log files:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;&lt;strong&gt;Where is the 1000th error?&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;How many errors happened before this timestamp?&lt;/strong&gt;&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;They look trivial. At scale they are not. The obvious implementation scans the&#10;whole dataset for every question, and with ten million entries that is ten&#10;million comparisons to answer one of them.&lt;/p&gt;</description></item><item><title>The Bloom Filter Optimization Saga: A Deep Dive into Go Assembly and AVX2</title><link>https://slow-is-smooth.io/blog/the-bloom-filter-optimization-saga-a-deep-dive-into-go-assembly-and-avx2/</link><pubDate>Mon, 10 Nov 2025 11:18:02 +0000</pubDate><guid>https://slow-is-smooth.io/blog/the-bloom-filter-optimization-saga-a-deep-dive-into-go-assembly-and-avx2/</guid><description>&lt;p&gt;If you&amp;rsquo;ve ever wondered how high-performance Go programs achieve their incredible speeds, the answer often lies hidden just beneath the surface, in files exactly like &lt;code&gt;avx2.s&lt;/code&gt;. This file is a fascinating example of targeted, low-level optimization.&lt;/p&gt;&#10;&lt;p&gt;So, let&amp;rsquo;s break down what this code does, why it exists, and how it works its magic.&lt;/p&gt;</description></item><item><title>The Bloom Filter Optimization Saga: Anatomy of a Go Concurrency Bug - Part 2</title><link>https://slow-is-smooth.io/blog/anatomy-of-a-go-concurrency-bug-2/</link><pubDate>Thu, 06 Nov 2025 19:16:25 +0000</pubDate><guid>https://slow-is-smooth.io/blog/anatomy-of-a-go-concurrency-bug-2/</guid><description>&lt;h3 id="final-optimization-solving-the-10x-performance-hit"&gt;Final Optimization: Solving the 10x Performance Hit&lt;/h3&gt;&#10;&lt;p&gt;This brings us to the performance report. We have successfully achieved a fully thread-safe implementation, but at a high cost. The performance results file shows a catastrophic &lt;strong&gt;8-12x performance regression&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;The Root Cause:&lt;/strong&gt; The bottleneck is not the &lt;code&gt;sync.Pool&lt;/code&gt; and not the atomic operations. It is the fix for Race #2: &lt;code&gt;positions := make([]uint64, bf.hashCount)&lt;/code&gt;&lt;/p&gt;</description></item><item><title>The Bloom Filter Optimization Saga: Anatomy of a Go Concurrency Bug - Part 1</title><link>https://slow-is-smooth.io/blog/the-bloom-filter-optimization-saga-anatomy-of-a-go-concurrency-bug-part-1/</link><pubDate>Sun, 02 Nov 2025 19:27:14 +0000</pubDate><guid>https://slow-is-smooth.io/blog/the-bloom-filter-optimization-saga-anatomy-of-a-go-concurrency-bug-part-1/</guid><description>&lt;p&gt;Github Project : &lt;a href="https://github.com/shaia/BloomFilter"&gt;https://github.com/shaia/BloomFilter&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="when"&gt;&lt;strong&gt;When &amp;lsquo;Read&amp;rsquo; Operations Mutate State&lt;/strong&gt;&lt;/h2&gt;&#10;&lt;p&gt;I recently investigated a critical bug in the&lt;code&gt;BloomFilter&lt;/code&gt; package that was causing panics under concurrent use. The&lt;code&gt;bloomfilter_concurrent_test.go&lt;/code&gt; file said it all: every test was skipped, citing a &amp;ldquo;nil pointer dereference in storage layer&amp;rdquo;.&lt;/p&gt;</description></item><item><title>The Bloom Filter Optimization Saga: From 3 Seconds to 66 Microseconds</title><link>https://slow-is-smooth.io/blog/the-bloom-filter-optimization-saga-from-3-seconds-to-66-microseconds/</link><pubDate>Thu, 30 Oct 2025 19:13:00 +0000</pubDate><guid>https://slow-is-smooth.io/blog/the-bloom-filter-optimization-saga-from-3-seconds-to-66-microseconds/</guid><description>&lt;p&gt;Building high-performance libraries often involves more than just clever algorithms. It&amp;rsquo;s a journey of measurement, discovery, and sometimes, learning that your &amp;ldquo;obvious&amp;rdquo; fix made things worse. &lt;a href="https://github.com/shaia/BloomFilter"&gt;Go SIMD-Optimized Bloom Filter&lt;/a&gt;, which you can read all about &lt;a href="https://slow-is-smooth.io/blog/simd-optimized-bloom-filter-in-go-an-in-depth-exploration/"&gt;here&lt;/a&gt;, is a project that started with a 4x SIMD speedup and ended with a &lt;strong&gt;6,595x&lt;/strong&gt; overall speedup after a deep dive into Go&amp;rsquo;s profiling tools.&lt;/p&gt;</description></item><item><title>The most profound rules of software development.</title><link>https://slow-is-smooth.io/blog/the-most-profound-rules-of-software-development/</link><pubDate>Tue, 14 Oct 2025 08:37:55 +0000</pubDate><guid>https://slow-is-smooth.io/blog/the-most-profound-rules-of-software-development/</guid><description>&lt;h3 id="category-1-on-system-evolution--complexity"&gt;Category 1: On System Evolution &amp;amp; Complexity&lt;/h3&gt;&#10;&lt;p&gt;&lt;em&gt;These laws describe the inherent nature of how software systems behave over time. They are not rules to follow but truths to accept and manage.&lt;/em&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;1. Gall&amp;rsquo;s Law:&lt;/strong&gt; A complex system that works is invariably found to have evolved from a simple system that worked.&lt;/p&gt;</description></item><item><title>CFD - Part 1</title><link>https://slow-is-smooth.io/blog/cfd-part-1/</link><pubDate>Sun, 28 Sep 2025 08:42:09 +0000</pubDate><guid>https://slow-is-smooth.io/blog/cfd-part-1/</guid><description>&lt;p&gt;&lt;img src="https://slow-is-smooth.io/images/cfd-part-1/flow_animation.gif" alt=""&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;em&gt;CFD Flow Animation&lt;/em&gt;&lt;/p&gt;&#10;&lt;p&gt;In a previous post, we discussed the &lt;a href="https://slow-is-smooth.io/blog/the-equations-of-everything-that-flows/"&gt;Navier-Stokes equations&lt;/a&gt;, which govern the behavior of fluids.&lt;/p&gt;&#10;&lt;h2 id="what-is-cfd-a-broader-perspective"&gt;What is CFD? A Broader Perspective&lt;/h2&gt;&#10;&lt;p&gt;Computational Fluid Dynamics (CFD) is a branch of fluid mechanics that uses numerical analysis and algorithms to solve and simulate problems involving fluid flows. It lies at the intersection of physics, mathematics, and computer science. At its heart, CFD is about translating the laws of nature — encapsulated in partial differential equations (PDEs) — into something a computer can solve.&lt;/p&gt;</description></item><item><title>The Equations of Everything That Flows</title><link>https://slow-is-smooth.io/blog/the-equations-of-everything-that-flows/</link><pubDate>Thu, 25 Sep 2025 08:07:34 +0000</pubDate><guid>https://slow-is-smooth.io/blog/the-equations-of-everything-that-flows/</guid><description>&lt;p&gt;Fluids are everywhere. Air rushes past airplane wings, rivers bend and twist through valleys, smoke curls lazily from a candle, and blood flows through our veins. These are all examples of matter in motion—continuous, smooth, impossible to pin down to just a handful of particles.&lt;/p&gt;</description></item><item><title>SIMD-Optimized Bloom Filter in Go: An In-Depth Exploration</title><link>https://slow-is-smooth.io/blog/simd-optimized-bloom-filter-in-go-an-in-depth-exploration/</link><pubDate>Mon, 22 Sep 2025 07:03:20 +0000</pubDate><guid>https://slow-is-smooth.io/blog/simd-optimized-bloom-filter-in-go-an-in-depth-exploration/</guid><description>&lt;p&gt;&lt;strong&gt;Project Repository:&lt;/strong&gt; &lt;a href="https://github.com/shaia/BloomFilter"&gt;https://github.com/shaia/BloomFilter&lt;/a&gt;&lt;/p&gt;&#10;&lt;h3 id="from-go-to-assembly"&gt;From Go to Assembly&lt;/h3&gt;&#10;&lt;p&gt;When we think of Go, we think of concurrency, simplicity, and &amp;ldquo;good enough&amp;rdquo; performance. But what happens when &amp;ldquo;good enough&amp;rdquo; isn&amp;rsquo;t good enough? What happens when you need to squeeze every last drop of performance out of the CPU for a critical, hot-path operation?&lt;/p&gt;</description></item><item><title>Solving the Pandigital Puzzle with AVX2 SIMD Acceleration.</title><link>https://slow-is-smooth.io/blog/solving-the-pandigital-puzzle-with-avx2-simd-acceleration/</link><pubDate>Mon, 21 Jul 2025 12:53:38 +0000</pubDate><guid>https://slow-is-smooth.io/blog/solving-the-pandigital-puzzle-with-avx2-simd-acceleration/</guid><description>&lt;h2 id="using-avx2-simd-instructions-in-c-to-accelerate-the-search-for-the-largest-1-9-pandigital-concatenated-product"&gt;Using AVX2 SIMD instructions in C++ to accelerate the search for the largest 1-9 pandigital concatenated product.&lt;/h2&gt;&#10;&lt;p&gt;If you&amp;rsquo;ve ever tackled &lt;strong&gt;Project Euler Problem 38&lt;/strong&gt;, you&amp;rsquo;re likely familiar with the hunt for the largest 1-to-9 pandigital number that can be formed by concatenating the product of an integer with &lt;code&gt;(1, 2, ..., n)&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Solving Project Euler 38 with MATLAB: The Vectorized Pandigital Blitz</title><link>https://slow-is-smooth.io/blog/solving-project-euler-38-with-matlab-the-vectorized-pandigital-blitz/</link><pubDate>Sun, 20 Jul 2025 19:19:31 +0000</pubDate><guid>https://slow-is-smooth.io/blog/solving-project-euler-38-with-matlab-the-vectorized-pandigital-blitz/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;&lt;em&gt;This post is part of a multi-language series exploring the problem of finding the largest 1–9 pandigital concatenated product. Check out the&lt;/em&gt; &lt;a href="https://slow-is-smooth.io/blog/solving-pandigital-multiples-with-c-and-length-based-pruning/"&gt;&lt;em&gt;C#&lt;/em&gt;&lt;/a&gt; &lt;em&gt;and&lt;/em&gt; &lt;a href="https://slow-is-smooth.io/blog/programmatically-finding-pandigital-multiples/"&gt;&lt;em&gt;Python&lt;/em&gt;&lt;/a&gt; &lt;em&gt;editions too.&lt;/em&gt;&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;h2 id="why-matlab"&gt;Why MATLAB?&lt;/h2&gt;&#10;&lt;p&gt;MATLAB might not be the first language that comes to mind for algorithmic problem solving, but its strength in matrix manipulation and vectorized computation makes it a powerful ally for concise, high-performance numeric routines.&lt;/p&gt;</description></item><item><title>Solving Pandigital Multiples with C# and Length‑Based Pruning</title><link>https://slow-is-smooth.io/blog/solving-pandigital-multiples-with-c-and-length-based-pruning/</link><pubDate>Sun, 20 Jul 2025 18:54:33 +0000</pubDate><guid>https://slow-is-smooth.io/blog/solving-pandigital-multiples-with-c-and-length-based-pruning/</guid><description>&lt;p&gt;&lt;em&gt;In this post, we’ll explore a C# implementation that finds the largest 1–9 pandigital concatenated product by mathematically pruning the search space based on digit lengths, rather than brute-forcing all possibilities.&lt;/em&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="1-the-pandigital-multiples-problem-recap"&gt;1. The Pandigital Multiples Problem Recap&lt;/h2&gt;&#10;&lt;p&gt;We seek the maximum 9‑digit number formed by concatenating the products:&lt;/p&gt;</description></item><item><title>Optimizing Pandigital Multiples in Python</title><link>https://slow-is-smooth.io/blog/optimizing-pandigital-multiples-in-python/</link><pubDate>Sun, 20 Jul 2025 18:53:29 +0000</pubDate><guid>https://slow-is-smooth.io/blog/optimizing-pandigital-multiples-in-python/</guid><description>&lt;p&gt;&lt;em&gt;In this follow-up post, we’ll transform our straightforward brute-force solution into a lean, mean, Pythonic machine, avoiding strings, pruning early, and utilizing bitmasks and vectorized data structures for clarity and speed.&lt;/em&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="1-integeronly-concatenation"&gt;1. Integer‑Only Concatenation&lt;/h2&gt;&#10;&lt;p&gt;Instead of building a string, we’ll assemble the concatenated product as an integer. We keep track of:&lt;/p&gt;</description></item><item><title>Programmatically Finding Pandigital Multiples</title><link>https://slow-is-smooth.io/blog/programmatically-finding-pandigital-multiples/</link><pubDate>Sun, 20 Jul 2025 16:41:53 +0000</pubDate><guid>https://slow-is-smooth.io/blog/programmatically-finding-pandigital-multiples/</guid><description>&lt;p&gt;&lt;em&gt;In this post we’ll go step by step through a clear, Python-based approach to solve the “concatenated pandigital multiples” problem. We’ll explain each part in simple terms, provide complete code examples, and ensure every detail is fully understandable—even if you’re new to programming.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Project Euler 38: Solving with Pen and Paper Like It’s 1899 🖊️</title><link>https://slow-is-smooth.io/blog/project-euler-38-solving-with-pen-and-paper-like-its-1899/</link><pubDate>Sun, 20 Jul 2025 16:40:36 +0000</pubDate><guid>https://slow-is-smooth.io/blog/project-euler-38-solving-with-pen-and-paper-like-its-1899/</guid><description>&lt;p&gt;In the age of compilers and cloud computing, it&amp;rsquo;s easy to forget how powerful logic and a pencil can be. Project Euler Problem 38 — finding the largest 1 to 9 pandigital number formed as a concatenated product — is typically solved with code. But what if we &lt;em&gt;couldn&amp;rsquo;t&lt;/em&gt; code it? Could we solve it by Hand?&lt;/p&gt;</description></item><item><title>The Fascinating World of Pandigital Multiples</title><link>https://slow-is-smooth.io/blog/the-fascinating-world-of-pandigital-multiples/</link><pubDate>Sun, 13 Jul 2025 18:17:04 +0000</pubDate><guid>https://slow-is-smooth.io/blog/the-fascinating-world-of-pandigital-multiples/</guid><description>&lt;p&gt;&lt;em&gt;Ever wondered how numbers can combine in surprising ways to reveal hidden patterns? Welcome to the story of pandigital multiples—a playful intersection of arithmetic and puzzling beauty that anyone can appreciate.&lt;/em&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="what-are-pandigital-numbers"&gt;What Are Pandigital Numbers?&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Pandigital&lt;/strong&gt; simply means a number that uses each of the digits from 1 through 9 exactly once.&lt;/li&gt;&#10;&lt;li&gt;For example, 123456789 and 918273645 are both 1–9 pandigital: they contain each digit without repeating or skipping.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Why does this matter? Pandigital numbers are like a perfect sudoku row: every piece in place, no duplication, a self-contained harmony of digits.&lt;/p&gt;</description></item><item><title>About Slow Is Smooth</title><link>https://slow-is-smooth.io/about/</link><pubDate>Sat, 12 Jul 2025 01:21:03 +0000</pubDate><guid>https://slow-is-smooth.io/about/</guid><description>&lt;p&gt;I&amp;rsquo;m Shai Asher. I write systems code — mostly Go, C and C++, and assembly for the stretches&#10;where the compiler and I disagree about something measurable.&lt;/p&gt;&#10;&lt;p&gt;This site is where that work gets written down. Not the tidied version: the one with the&#10;measurements still in it, including the measurements that said I was wrong.&lt;/p&gt;</description></item></channel></rss>