Localization Failure: Temperature is Hard

The Guardian is one of my favorite news sources. I’m a subscriber (support news organizations!) and I read it daily. But it is not immune to errors, as this headline shows: 68F above average is a lot. For a tropical … Continue reading → | Continue reading


@randomascii.wordpress.com | 7 months ago

When Debug Symbols Get Large

TL;DR – upgrade your tools, including Visual Studio, windbg, and Windows Performance Toolkit, if you want to handle Chromium’s symbol files. Details: Death, taxes, and browser engines relentlessly growing – those are the three things that you can really be … Continue reading → | Continue reading


@randomascii.wordpress.com | 1 year ago

No Start Menu for You

I tend to launch most programs on my Windows 10 laptop by typing the key, then a few letters of the program name, and then hitting enter. On my powerful laptop (SSD and 32 GB of RAM) this process … Continue reading → | Continue reading


@randomascii.wordpress.com | 1 year ago

Please Restore Our Registers When You’re Done With Them

“Hey, you. Yes you, that function over there. When you’re cleaning up please remember to restore all of my registers. Yes, that one too – what do you think this is, Linux?” That’s the problem I was dealing with in … Continue reading → | Continue reading


@randomascii.wordpress.com | 1 year ago

Why Modern Software Is Slow

I apologize for this title because there are many things that can make modern software slow. Blindly applying one explanation without a bit of investigation is the software equivalent of a cargo cu… | Continue reading


@randomascii.wordpress.com | 1 year ago

Slower Memory Zeroing Through Parallelism

While investigating some performance mysteries in Chrome I discovered that Microsoft had parallelized how they zero memory, and in some cases this was making it a lot slower. This slowdown may be m… | Continue reading


@randomascii.wordpress.com | 1 year ago

5.5 mm in 1.25 nanoseconds

In 2004 I was working for Microsoft in the Xbox group, and a new console was being created. I got a copy of the detailed descriptions of the Xbox 360 CPU and I read it through multiple times and su… | Continue reading


@randomascii.wordpress.com | 2 years ago

Floating-Point Complexities (2012)

Binary floating-point math is complex and subtle. I’ve collected here a few of my favorite oddball facts about IEEE floating-point math, based on the articles so far in my floating-point series. Th… | Continue reading


@randomascii.wordpress.com | 2 years ago

What Would Jesus’s Resume Say? (2018)

Some years ago I saw a set of resumes created by not-yet-graduated university students. They were all three to four pages long. This is too long, and I said to my daughter “Even Jesus Christ’s resu… | Continue reading


@randomascii.wordpress.com | 2 years ago

The Surprising Subtleties of Zeroing a Register

Zeroing out a CPU register seems like the simplest and most basic operation imaginable, but in fact x86 CPUs contain a surprising amount of special logic to make this operation run smoothly. The mo… | Continue reading


@randomascii.wordpress.com | 2 years ago

Finding Windows HANDLE leaks, in Chromium and others

Three years ago I found a 32 GB memory leak caused by CcmExec.exe failing to close process handles. That bug is fixed, but ever since then I have had the handles column in  Windows Task Manage… | Continue reading


@randomascii.wordpress.com | 2 years ago

Finding a CPU Design Bug in the Xbox 360 (2018)

The recent reveal of Meltdown and Spectre reminded me of the time I found a related design bug in the Xbox 360 CPU – a newly added instruction whose mere existence was dangerous. Back in 2005 I was… | Continue reading


@randomascii.wordpress.com | 2 years ago

Symbols the Microsoft Way

Symbol servers allow developer tools on Windows to automatically find symbols. They do this so well that most developers never have to worry about the internal mechanisms. However when things go wr… | Continue reading


@randomascii.wordpress.com | 3 years ago

Ditching WhatsApp

WhatsApp has served me well as a communications medium for my family, but I was never thrilled with its ownership by Facebook, and the recently announced privacy changes made it necessary for me to… | Continue reading


@randomascii.wordpress.com | 3 years ago

ARM and Lock-Free Programming

I was inspired by the release of Apple’s M1 ARM processor to tweet about the perils of lock-free programming which led to some robust discussion. The discussion went pretty well given the inanity o… | Continue reading


@randomascii.wordpress.com | 3 years ago

Floating Point in the Browser, Part 3: When x+y=x

A few years ago I did a lot of thinking and writing about floating-point math. It was good fun, and I learned a lot in the process, but sometimes I go a long time without actually using that hard-e… | Continue reading


@randomascii.wordpress.com | 3 years ago

Floating Point in the Browser, Part 2: Bad Epsilon

A few years ago I did a lot of thinking and writing about floating-point math. It was good fun, and I learned a lot in the process, but sometimes I go a long time without actually using that hard-e… | Continue reading


@randomascii.wordpress.com | 3 years ago

Creating a Public Symbol Server

I’ve been a big fan of symbol servers for years. They are a part of the Microsoft/Windows ecosystem that is far better than anything I have seen for other operating systems. With Microsoft’s and Ch… | Continue reading


@randomascii.wordpress.com | 3 years ago

There Are Only Four Billion Floats–So Test Them All

A few months ago I saw a blog post touting fancy new SSE3 functions for implementing vector floor, ceil, and round functions. There was the inevitable proud proclaiming of impressive performance an… | Continue reading


@randomascii.wordpress.com | 3 years ago

Windows Timer Resolution: The Great Rule Change

The behavior of the Windows scheduler changed significantly in Windows 10 2004, in a way that will break a few applications, and there appears to have been no announcement, and the documentation ha… | Continue reading


@randomascii.wordpress.com | 3 years ago

Floating Point in the Browser, Part 1: Impossible Expectations

A few years ago I did a lot of thinking and writing about floating-point math. It was good fun, and I learned a lot in the process, but sometimes I go a long time without actually using that hard-e… | Continue reading


@randomascii.wordpress.com | 3 years ago

The Easy Ones – Three Bugs Hiding in the Open

I write a lot about investigations into tricky bugs – CPU defects, kernel bugs, transient 4-GB memory allocations – but most bugs are not that esoteric. Sometimes tracking down a bug is as simple a… | Continue reading


@randomascii.wordpress.com | 3 years ago

The Easy Ones – Three Bugs Hiding in the Open

I write a lot about investigations into tricky bugs – CPU defects, kernel bugs, transient 4-GB memory allocations – but most bugs are not that esoteric. Sometimes tracking down a bug is as simple a… | Continue reading


@randomascii.wordpress.com | 3 years ago

TimeGetTime versus GetTickCount

I have a confession to make – I only just found out the difference between the Windows functions GetTickCount and timeGetTime. I know what you’re thinking – I’m a game developer and I should know b… | Continue reading


@randomascii.wordpress.com | 3 years ago

GDI Leaks and the Importance of Luck

In May 2019 I was asked to look at a potentially serious Chrome bug. I initially misdiagnosed it as unimportant, thus wasting two valuable weeks, and when I rejoined the investigation it was the nu… | Continue reading


@randomascii.wordpress.com | 4 years ago

What Outranks Thread Priority?

This investigation started, as so many of mine do, with me minding my own business, not looking for trouble. In this case all I was doing was opening my laptop lid and trying to log on.The first fe… | Continue reading


@randomascii.wordpress.com | 4 years ago

Big Project Build Times–Chromium

A twitter discussion on build times and source-file sizes got me interested in doing some analysis of Chromium build times. I had some ideas about what I would find (lots of small source files caus… | Continue reading


@randomascii.wordpress.com | 4 years ago

O(n^2), again, now in WMI

I recently hit some multi-minute delays on my workstation. After investigating I found that the problem was due to a lock being held for five minutes, and during that time the lock-holder was mostl… | Continue reading


@randomascii.wordpress.com | 4 years ago

Intermediate Floating-Point Precision

Riddle me this Batman: how much precision are these calculations evaluated at? If you answered ‘double’ and ‘float’ then you score one point for youthful idealism, but zero points for correctness. … | Continue reading


@randomascii.wordpress.com | 4 years ago

Heap Snapshots–Tracing All Heap Allocations

I’ve recently started using heap snapshots on Windows to track heap allocations. I was able to use heap snapshots to record call stacks for all outstanding allocations in Chrome’s browser process o… | Continue reading


@randomascii.wordpress.com | 4 years ago

63 Cores Blocked by Seven Instructions

I seem to have a habit of writing about super powerful machines whose many cores are laid low by misuse of locks. So. Yeah. It’s that again.But this one seems particularly impressive. I mean, how o… | Continue reading


@randomascii.wordpress.com | 4 years ago

We need a carbon tax, now, that goes up over time

If we tax fossil fuels – making them more expensive – then the awesome power and creativity of the free market will create diverse alternatives and efficiencies with minimal additional … | Continue reading


@randomascii.wordpress.com | 4 years ago

Taskbar Latency and Kernel Calls

I work quickly on my computer and I get frustrated when I am forced to wait on an operation that should be fast. A persistent nuisance on my over-powered home laptop is that closing windows on the … | Continue reading


@randomascii.wordpress.com | 4 years ago

Add a const here, delete a const there (2017)

Update, February 2019: Two years later the VC++ bug I reported here still exists, even in VS 2019 preview. However Chromium no longer builds with VC++ so I’m reverting the changes where I del… | Continue reading


@randomascii.wordpress.com | 4 years ago

O(N^2) in CreateProcess

So many possible introductions to this one:Windows 7: Sheesh, I sure am slow at creating processesWindows 10: Hold my beer…Or how about:A) How long does CreateProcess take on Windows?B) How long wo… | Continue reading


@randomascii.wordpress.com | 5 years ago

Exercises in Emulation: Xbox 360’s FMA Instruction

Years ago I worked in the Xbox 360 group at Microsoft. We were thinking about releasing a new console, and we thought it would be nice if that console could run the games of the previous console. E… | Continue reading


@randomascii.wordpress.com | 5 years ago

When Your Profiler Lies

Last week I wrote about the performance consequences of inadvertently loading gdi32.dll into processes that are created and destroyed at very high rates. This week I want to share some techniques f… | Continue reading


@randomascii.wordpress.com | 5 years ago

A Not-Called Function Can Cause a 5X Slowdown

Subtitle: Making Windows Slower Part 3: Process Destruction In the summer of 2017 I wrestled with a Windows performance problem. Process destruction was slow, serialized, and was blocking the syste… | Continue reading


@randomascii.wordpress.com | 5 years ago

Making Windows Slower Part 2: Process Creation

Windows has long had a reputation for slow file operations and slow process creation. Have you ever wanted to make these operations even slower? This weeks’ blog post covers a technique you can use… | Continue reading


@randomascii.wordpress.com | 5 years ago

Stop using strncpy already (2013)

I keep running into code that uses strcpy, sprintf, strncpy, _snprintf (Microsoft only), wcsncpy, swprintf, and morally equivalent functions. Please stop. There are alternatives which are far safer… | Continue reading


@randomascii.wordpress.com | 5 years ago

24-core CPU and I can’t type an email (part two)

In my last post I promised to give more details about some rabbit holes that I went down during the investigation, including page tables, locks, WMI, and a vmmap bug. Those details are here, along … | Continue reading


@randomascii.wordpress.com | 5 years ago

24-core CPU and I can’t type an email (part one)

I wasn’t looking for trouble. I wasn’t trying to build Chrome a thousand times in a weekend, I was just engaging in that most mundane of 21st century tasks, writing an email at 10:30 am. And sudden… | Continue reading


@randomascii.wordpress.com | 5 years ago

Intel Underestimates Error Bounds by 1.3 quintillion (2014)

Intel’s manuals for their x86/x64 processor clearly state that the fsin instruction (calculating the trigonometric sine) has a maximum error, in round-to-nearest mode, of one unit in the last place… | Continue reading


@randomascii.wordpress.com | 5 years ago

Stupid Float Tricks (2012)

Type Punning is Not a Joke I left the last post with a promise to share an interesting property of the IEEE float format. There are several equivalent ways of stating this property, and here are tw… | Continue reading


@randomascii.wordpress.com | 5 years ago

Floating-Point Determinism

Is IEEE floating-point math deterministic? Will you always get the same results from the same inputs? The answer is an unequivocal “yes”. Unfortunately the answer is also an unequivocal “no”. I’m a… | Continue reading


@randomascii.wordpress.com | 5 years ago