/Optimization

The One Billion Row Challenge In Go: From 1m 45s To 4s In Nine Solutions

- Ben Hoyt tl;dr: “This article describes the nine solutions I wrote in Go, each faster than the previous. The first, a simple and idiomatic solution, runs in 1 minute 45 seconds on my machine, while the last one runs in about 4 seconds. As I go, I’ll show how I used Go’s profiler to see where the time was being spent.”

featured in #494


The Billion Row Challenge (1BRC) - Step-By-Step From 71s To 1.7s

- Marko Topolnik tl;dr: “The main thing I'd like to show you in this post is that a good part of that amazing speed comes from easy-to-grasp, reusable tricks that you could apply in your code as well. Towards the end, I'll also show you some of the magical parts that take it beyond that level.”

featured in #491


How Fast Is Your Shell?

- Thorsten Ball tl;dr: “Think about it this way: which program do you execute more often than your shell? How many shells do you spawn every day? How many other programs do you run every day that spawn your shell? If you’re anything like me, it’s a lot of shells per day. I’m a heavy terminal and tmux user. I spawn shells like I open new tabs in a browser. Do you want one of your most-used programs to start slow because you didn’t care?” Thorsten shares how to measure and optimize the shell’s speed.

featured in #480


Four Kinds Of Optimisation

- Laurence Tratt tl;dr: "I have devoted more of my life to optimisation than I care to think about, and that experience has led me to make two observations: (1) Human optimism leads us to believe that we can easily know where a program spends most of its time. (2) Human optimism leads us to believe that we can easily know how to make the slow parts of a program run faster." Laurence believes there are multiple solutions and trade-offs to the second solution: Use a better algorithm, use a better data-structure, use a lower-level system and accept a less precise solution. 

featured in #466


A Tale Of Query Optimization

- Manish Gill tl;dr: Case study into how the author isolated, debugged and optimized a query, reducing its call-time from ~24 mins to 2 seconds. Author also discusses lessons learned.

featured in #143