New
The latest blog posts to take off on Hacker News. 4,389 posts.
When TCP sockets refuse to die
While working on our Spectrum server , we noticed something weird: the TCP sockets which we thought should have been closed were lingering around. We realized we don't really understand when TCP sockets are supposed to time out!
Async.h – asynchronous, stackless subroutines in C
The async/await idiom is becoming increasingly popular. The first widely used language to include it was C#, and it has now spread into Jav...
Common Systems Programming Optimizations and Tricks
Today’s blog post is an overview of some common optimization techniques and neat tricks for doing “systems programming” – whatever that means today. We’ll walk through some methods to make your code run faster, be more efficient, and to squeeze just a little more juice from whatever you got.
Absolute Scale Corrupts Absolutely
The Internet has gotten too big. Growing up, I, like many computery people of my generation, was an idealist. I believed that better, faste...
Popcount CPU instruction
Most CPU architectures in use today have an instruction called popcount , short for “population count”. Here’s what it does: it counts the number of set bits in a machine word. For example (assuming 8-bit words for simplicity), popcount(00100110) is 3 and popcount(01100000) is 2 .
Let the callers of your API control allocations
This is a post about performance. Most of the time when worrying about the performance of a piece of code the overwhelming advice should be (with apologies to Brendan Gregg) don’t worry about it, yet. However there is one area where I counsel developers to think about the performance implications of a design, and that…
The Eternal Mainframe (2013)
The urge to replace the mainframe has reinvented the mainframe and its problems.
FreeBSD on the Lenovo Thinkpad
Compatibility of FreeBSD on a Lenovo Thinkpad T480, notes and fixes (HiDPI, Trackpad, camera, etc).
Good Code Design from Linux
Learn how Linux/FFmpeg C partial codebase is organized to be extensible and act as if it were meant to have “polymorphism”. Specifically, we’re going to briefly explore how Linux …
Anatomy of a High-Performance Convolution
It's no surprise that modern deep-learning libraries have production-level, highly-optimized implementations of most operations. But just what is the black magic that these libraries use that we mere mortals don't? What exactly does one do to "optimize" or accelerate neural networks operations?
Beginner's Guide to Linkers (2010)
This article is intended to help C & C++ programmers understand the essentials of what the linker does. I've explained this to a number of colleagues over the years, so I decided it was time to write it down so that it's more widely available (and so that I don't have to explain it again). [Updated March 2009 to…
The Paxos Algorithm, or How to Win a Turing Award
The lectures assume no prior knowledge of the Paxos consensus algorithm or of TLA+, the language in which the specifications are written. In fact, the lectures constitute a crash course on TLA+. If you're interested just in the algorithm, you will probably find the specs annoying and will try to read only the…
Linux Pressure Stall Information (PSI) by Example
[Discuss this article and read other’s comments on the subject on this thread on Hacker News.] The three fundamental building blocks of computers, CPU, I/O and RAM can come under pressure due to co…
A deep dive into Linux namespaces, part 4
Running processes in isolated network namespaces
Learning SIMD with Rust by Finding Planets (2018)
How to get the most of Rust while keeping your code portable
If you must run Windows 10
Barring divine intervention, Windows 10 Enterprise LTSC 2019 ( formerly LTSB ) may be the least bad option:
Do-It-Yourself OpenJDK Garbage Collector
Aleksey Shipilёv, JVM/Performance Geek, Shout out at Twitter: @shipilev Questions, comments, suggestions: aleksey@shipilev.net
Zen 2 Missives – AMD now delivering efficiencies that are double that of Intel
After languishing through the CPU dark-ages (read: Intel trying real hard to keep people on 4 cores so they could charge an arm and a leg for more), the last two years has seen a vertible tsunami of advances in CPU technologies. AMD's introduction of an 8-core CPU (the 1700X) began the rat-race and with both AMD and…
A dream of an ultimate OS (1995)
A vision of an OS that recognizes that any user activity and most of the system activities are nothing but queries, which ought to be treated uniformly and implemented efficiently once and for all; database as a file system; A paper submitted to MacHack'95
Where do interrupts happen?
Trying to determine exactly where asynchronous interrupts are delivered on Intel CPUs.
Why Const Doesn't Make C Code Faster
In a post a few months back I said it’s a popular myth that const is helpful for enabling compiler optimisations in C and C++ . I figured I should explain that one, especially because I used to believe it was obviously true, myself. I’ll start off with some theory and artificial examples, then I’ll do some experiments…
How Rust optimizes async/await
The issue to stabilize an initial version of async/await in Rust has left final comment period. The feature looks slated to stabilize in an upcoming release, most likely 1.39. This represents the culmination of an enormous amount of work by people all over the Rust community. But it’s also only the beginning of…
Performance Matters
Last year I got certified as an EMT. As part of the training I shadowed an ambulance for a day and assisted with each run. For each patient we treated, we had to fill out a patient care report. A patient care report. (source) EMTs are just one part in a long chain. If they transport a patient to a hospital, the…
What has to happen with Unix virtual memory when you have no swap space
You're probably reading this page because you've attempted to access some part of my blog (Wandering Thoughts) or CSpace , the wiki thing it's part of. Unfortunately you're using a browser version that my anti-crawler precautions consider suspicious, most often because it's too old (most often this applies to versions…