Cranelift, Part 4: A New Register Allocator
This post is the fourth part of a three-part series 1 describing work that I have been doing to improve the Cranelift compiler. In this post, I'll describe the work that went into regalloc2 , a new register allocator I developed over the past year. The allocator started as an effort to port IonMonkey's register…
Lz_xor
If LZ compression is compilation , what other instructions are useful to add? I've spent the last several years, off and on, trying to figur...
Software Engineering Insights from 10 Years at Google
Lessons learned from 10 years at Google
Cron best practices
The time-based job scheduler cron(8) has been around since Version 7 Unix, and its crontab(5) syntax is familiar even for people who don’t do much Unix system administration. It’s standardised , reasonably flexible, simple to configure, and works reliably, and so it’s trusted by both system packages and users to…
Working with Tailwind CSS every day for 2 years
For more than two years, I've been using Tailwind CSS almost every working day for company projects and a lot of weekends for my side projects.
The pervasive effects of C's malloc() and free() on C APIs
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…
You Should Compile Your Python and Here’s Why
write Python that’s faster than C by optimizing your code, adding standard type annotations, and using Mypyc.
Data-Oriented Programming in Python
Many users of Python deprioritize performance in favor of soft benefits like ergonomics, business value, and simplicity. Users who prioritize performance typically end up on faster compiled languages like C++ or Java.
Zerocal – A Serverless Calendar App in Rust
<img src="https://endler.dev/2022/zer…
SIMD accelerated sorting in Java – how it works and why it was 3x faster
In this post I explain a little about how to use Java’s Vector APIs, attempt to explain how they turn out fast, and then use them to implement a sorting algorithm 3x faster than Arrays.sort . I then explain some problems I found, and how I resolved them. Supporting code is published here .
Backend for Front-end
In the good old days, applications were simple. A browser sent a request to a webapp endpoint; the latter fetched data from a database and returned the response. The rise of mobile clients and integrations with other apps upset this simplicity. I want to discuss one solution to handle the complexity in this post. The…
Hashing is not encryption
Encryption, encoding, and hashing are three related but distinct concepts. It’s important for you to understand all three.
A small Stripe fraud story
A story post about the time a Stripe account I used years ago had thousands of pounds worth of unexpected payments flood in.
I'm making a Typescript type-checker in Rust
TLDR; I'm making a Typescript type-checker in Rust. Right now it supports a smaller subset of the type-system and exists as a fun side-project, but the end goal is a compilation tool we can use to make Typescript compilation go brrrr...
Don't Write a Programming Language
It will chew you up and spit you out, and you'll not even complain. I often start new projects at the beginning of the year, around Dec...
Building software to last forever
How Bear is going to live a long and healthy life
Updating the most influential book of the BASIC era
In a way, these two books are responsible for my entire professional career. With early computers, you didn’t boot up to a fancy schmancy desktop, or a screen full of apps you could easily poke and prod with your finger. No, those computers booted up to the command line.
Falsehoods programmers believe about undefined behavior
All kinds of reasonable-sounding beliefs about undefined behavior are wrong. Let's go through them.
Justice Clarence Thomas uncovered a seven-year-old bug in my program (2013)
Franklin Chen's personal website and blog
Go's Concurrency Examples in Java 19
There is no way for your operating system to know exactly how much stack space a thread will need so it allocates an amount on the order of around a kilobyte initially and then around a megabyte once the thread starts to be used. You only have around a bakers dozen gigabytes of RAM, so you can only have give or take…
Optimizing compilers reload vector constants needlessly
Modern processors have powerful vector instructions which allow you to load several values at once, and operate (in one instruction) on all these values. Similarly, they allow you to have vector constants. Thus if you wanted to add some integer (say 10001) to all integers in a large array, you might first load a…
SwiftUI for Mac 2022
Crazy Mac lady. Mac author & developer. Lover of Apple computers and devices. Swift & SwiftUI enthusiast. Unofficial Mac app dev evangelist
Write Like You Code
Similarities between good writing and good code.