The other day, while working on fpdf2,
a nice decorator that came in the standard library with Python 3.7,
to quickly define a
class that mostly stored data.
Then a question came to my mind: is the
__slots__ memory optimization compatible with …
A 40-page Bachelor’s degree thesis on the legendary bit-hacking Quake III Q_rsqrt() implementation:
In this post, we will explore how Unix pipes are implemented in Linux by iteratively optimizing a test program that writes and reads data through a pipe.1
We will begin with a simple program with a throughput of around 3.5GiB/s, and improve its performance twentyfold.
Perhaps the most popular (or infamous) example of a shell namespace extension is the Compressed Folders extension, which handles the exploration of ZIP files. [...] Unfortunately, the code hasn’t really been updated in a while. A long while. The timestamp in the module claims it was last updated on Valentine’s Day 1998, and while I suspect there may’ve been a fix here or there since then (and one feature, extract-only Unicode filename support), it’s no secret that the code is, as Raymond Chen says: “stuck at the turn of the century.”
Unfortunately, there are degenerate cases where the ZIP Folders support really is broken. I ran across one of those yesterday. [...] Windows spent well over a minute showing “Calculating…” with no visible progress beyond the creation of a single subfolder with a single 5k file within. Huh? I knew that the ZIP engine beneath ZIP Folders wasn’t well-optimized, but I’d never seen anything this bad before. After waiting a few more minutes, another file extracted, this one 6.5 mb. This is bananas.
After some small reads from the end of the file (where the ZIP file keeps its index), the entire 11 million byte file was being read from disk a single byte at a time:
AVIF is a new image format derived from the keyframes of AV1 video.
Mentions: https://squoosh.app an image compression web app that allows you to dive into the advanced options provided by various image compressors.
how fast is qsort when it comes to sorting integers and can we do better?
an entertaining dive down a low-level performance-optimization rabbit hole, diving into radix sort on an array of integers in particular
Very detailed and insightful post-mortem on the winning game of the js13kGames competition !
Reminds me of Fabien Sanglard game architetcure reviews, except it's from the author himself :)
I opted to render the player character as a sprite as well, even though it needs to be freely rotated. It was far easier to produce 8 different sprites – one for each direction – than to implement a loader and renderer for complex 3D models. [...] The game never needs to rotate any geometry. [...] To make the player character rotation look convincing I build a 3D model and simply took screenshots for each of the different perspectives. I'm a total doofus when it comes to 3D modeling software, but that doesn't stop me from using the ingenious Wings3D. The result doesn't look like much, but scaled down to 16px, it doesn't matter.