Making good sorts go bad
Or, how can we construct bad inputs for any sorting or selection algorithm? Prologue Everyone loves sorting. Even people who don’t know they do, because our phones, tablets and laptops are always...
View ArticleThe Quaternion Julia Set, in Clojure
Graphics programming is one of my favourite things to do when learning a new programming language. Since I have been learning a bit of Clojure recently, I decided to see if anyone had written up a...
View ArticleKnuth’s Wisdom
Or, what’s really so bad about bubble sort? Prologue In a previous post I talked about trying to bring out the worst in sorting algorithms. Given the torrent of interest in that post, I’m going to...
View ArticleThe Matrix Puzzle From Hell, Revisited
Dark Origins This is a short post about a tough puzzle I came across a few months back, originally at Two Guys Arguing. Since it’s the Matrix Puzzle From Hell, and it’s nearly Halloween, I thought it...
View ArticleReading While Writing Without Waiting
Reading and Writing It’s fairly common to have a data structure that is occassionally mutated but often read, with the writing and reading occurring on different threads. This type of scenario can...
View ArticleWriting While Not Reading Too Much
Recap My last post described the concurrency construction called Left-Right at a very high level. Left-Right allows for concurrent reading and writing of a data structure with wait-free reads that can...
View ArticleSpeculating About Store-Buffer Capacity
Removing Fences If you’re ever looking to squeeze the performance of lock-free code it’s tempting to try and get rid of unnecessary memory fences. On x86/x64, this can be tantalising, as there’s only a...
View ArticleLeft-Right: Wait-free Reading While Writing
Recap In some previous posts (here and here) I’ve described Pedro Ramalhete and Andreia Craveiro’s Left-Right, a concurrency construction that enables concurrent reading and writing of a data...
View Article