I’ve built what I think is a pretty neat Ruby tracing profiler. It captures four event streams: Ruby function calls, system calls, thread-state changes, and garbage-collection activity, while adding less than 30 ns of overhead per Ruby function call, low enough for continuous use in large-scale production systems. As far as I know, no other Ruby tracer offers this mix of signals at this cost. If…
Since syscalls are near the very bottom of any software stack, their misbehavior can be particularly hard to test for. Stuff like running out of disk space, network connections timing out, or bumping into system limits all ultimately manifest as a syscall failing somewhere. If you want your code to be resilient to these kinds of failures, it sure would be nice if you could simulate these…
“Summing ASCII Encoded Integers on Haswell at the Speed of memcpy” turned out more popular than I expected, which inspired me to take on another challenge on HighLoad: Counting uint8s . I’m currently only #13 on the leaderboard, ~7% behind #1, but I have already learned some interesting things. In this post I’ll describe my complete solution ( skip to that ) including a surprising memory read…
“Print the sum of 50 million ASCII-encoded integers uniformly sampled from [0, 2³¹−1], separated by a single new line and sent to standard input.” On the surface, a trivial problem. But what if you wanted to go as fast as possible? I’m currently one of the top ranked competitors in exactly that kind of challenge and in this post I’ll show you a sketch of my best performing solution. I’ll leave out…
We’ve released a new version of Cirron that can now trace syscalls and record performance counters for individual lines of Ruby code, just like it could already do for Python (more here and here). It makes it very easy to quickly inspect what’s happening in any section of your code and even assert what should be happening in tests, for example.
In this TT talks about how mathematicians usually work by themselves or with colleagues they trust a lot, because otherwise you spend a lot of time checking everyone’s work for errors. With Lean (a theorem prover) you can automate this checking. At the moment writing Lean proofs takes ~10x longer than doing it by hand, but it gives you greates scalability through lowering the trust barrier. And…
Did you know it takes about 17,000 CPU instructions1 to print("Hello") in Python? And that it takes ~2 billion of them to import seaborn? Since writting this I have upgraded Cirron to substract its own overhead; it now measures print at ~9,000 instructions.