<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Software Architecture on Beyond the Bytes</title><link>https://srajesh2712.github.io/categories/software-architecture/</link><description>Recent content in Software Architecture on Beyond the Bytes</description><generator>Hugo -- 0.160.1</generator><language>en-us</language><lastBuildDate>Sun, 26 Apr 2026 06:00:00 +0000</lastBuildDate><atom:link href="https://srajesh2712.github.io/categories/software-architecture/index.xml" rel="self" type="application/rss+xml"/><item><title>Part 2 - From $O(N^2)$ to $O(N)$ with Zero Memory Churn: A Go Optimization Story</title><link>https://srajesh2712.github.io/posts/2026/04/26/array-difference-optimization-2/</link><pubDate>Sun, 26 Apr 2026 06:00:00 +0000</pubDate><guid>https://srajesh2712.github.io/posts/2026/04/26/array-difference-optimization-2/</guid><description>&lt;p&gt;In my previous post, I optimized a slice difference algorithm ($O(n+m)$) by pre-allocating memory. But as a Software Architect, I immediately asked myself:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Can I do this with &lt;em&gt;zero&lt;/em&gt; extra memory for the result?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The answer is an &lt;strong&gt;in-place algorithm&lt;/strong&gt;, implemented using the &lt;strong&gt;two-pointer technique&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In high-performance systems and big data pipelines, this approach is often the gold standard because it minimizes memory churn and reduces pressure on the garbage collector.&lt;/p&gt;</description></item><item><title>Part 2 - From $O(N^2)$ to $O(N)$ with Zero Memory Churn: A Go Optimization Story</title><link>https://srajesh2712.github.io/posts/2026/04/19/array-difference-optimization-1/</link><pubDate>Sun, 19 Apr 2026 06:00:00 +0000</pubDate><guid>https://srajesh2712.github.io/posts/2026/04/19/array-difference-optimization-1/</guid><description>&lt;p&gt;🚀 From O(N2) to O(N) with Zero Memory Churn: A Go Optimization Story&lt;/p&gt;
&lt;p&gt;As a Software Architect, I believe the difference between &amp;ldquo;code that works&amp;rdquo; and &amp;ldquo;production-grade engineering&amp;rdquo; lies in understanding the runtime. Today, I’m sharing a journey of optimizing a simple Array Difference algorithm in Go (Golang), achieving a 66% reduction in RAM and a 73% drop in allocations.
🛠️ The Evolution of the Solution
Step 1: The Functional Baseline (The &amp;ldquo;Naive&amp;rdquo; Approach)&lt;/p&gt;</description></item></channel></rss>