Python, C, Assembly – Faster Cosine Similarity
From pure Python to AVX-512 assembly, optimizing cosine similarity reveals a 2,500x speedup through SIMD, FP16, and VNNI instructions on modern Intel CPUs.
The latest blog posts to take off on Hacker News. 14,540 posts.
From pure Python to AVX-512 assembly, optimizing cosine similarity reveals a 2,500x speedup through SIMD, FP16, and VNNI instructions on modern Intel CPUs.
Figuring out how much parallelism your program can use is surprisingly tricky.
Zig is a new, independently developed low-level programming language. It’s a modern reimagining of C that attempts to retain C’s performance while embracing improvements from the last 30 years of tooling and language design. Zig makes calling into C code easier than any other language I’ve used. Zig also treats unit…
Static vs dynamic typing debates often flounder because the debators see from two different perspectives without knowing it. Learning to identify the two perspectives can calm the discussion. The tension between the two perspectives has led to Gradual Typing and other technologies.
Like Jupyter notebooks, but for any language.
As regular readers of this blog will now, JDK Flight Recorder (JFR) is one of my favorite tools of the Java platform. This low-overhead event recording engine built into the JVM is invaluable for …
Users of mature C libraries conventionally get to choose how memory is allocated — that is, when it cannot be avoided entirely . The C standard never laid down a convention — perhaps for the better — so each library re-invents an allocator interface. Not all are created equal, and most repeat a few fundamental…
What options are there other than GitHub?
I recently wrote a small 16-bit Forth for 8086 PCs running DOS. I built the basic one-liner loop words that can trivially be built with j...
Knock knock? Who’s there? It’s me, Oskar, the end is near, did you know that? Ah, you know it but don’t know how to proceed? Let’s talk about the end of the CRUD world…
The fundamental problems a database engineer thinks about in the shower
If you have a QA team, please read this and give them a large raise.
Ruby's `private` keyword means something different compared to basically all other object-oriented languages. Most other languages don't even have a feature matching what Ruby calls `private`, but incredibly, Scala does, which it calls `protected[this]` (meaning
(This post is now also listed on the Pickcode Blog) In 11th grade, I wrote my first program, Dingo Hopper. In the game, the player controls a png of a din...
htmx, a disciple of hypermedia , available only in hardcover do not look for alternatives , has been manifesting itself into existence recently ( recently: after 10 years of work 1 ) and has finally reached critical mass 2 .
Christmas is coming up. When I used to work at a bank the entire month of December and a bit of January we were placed under “Change Freeze”. We weren’t allowed to deploy updates to our applications during this period. The thinking was: A lot of people are away over Christmas Application changes can lead to crashes…
When we think “a fast AOT WebAssembly compiler and runtime”, we typically think about V8, Wasmer, WasmEdge or Wasmtime.
Undo and redo have been a staple operation of text editors probably since the first typo was ever made, yet there has not been a lot of innovation around refining the idea of what undo and redo could be. Let’s explore what I mean…
The following Python function computes the Fibonacci sequence , without loops, recursion or floating point arithmetic:
How I built a graphical bootable "game" for the Raspberry Pi (or any other modern computer) in C#.
Every now and then, when working on ScummVM’s Director engine, I run across a disc that charms me so much I just have to get it working right away....
Post by Eshel Yaron about changes for the worse in Emacs 30 registers feature
Understand the mechanics of dynamic dispatch implementation in CPython
fzf is a popular tool among command line hackers. But if you're an Emacs user, it's hard to use as it requires an interactive terminal. What if you could use Emacs to do the fuzzy finding instead of fzf?
In this blog post, we explore Spotify's journey from using the Fisher-Yates shuffle to a more sophisticated song shuffling algorithm that prevents clustering of tracks by the same artist. We then connect this challenge to Fibonacci hashing, and propose a novel, evenly distributed artist shuffling method.
Learning how to build quality software is not part of computer science education. How do we learn it?
Adding noise texture with only code
An occasional blog about OpenPGP keyservers and related issues