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.
Every blog post that took off on Hacker News, ranked by the votes of its best submission. 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.
Several months ago I had a go at producing a high resolution 256-color driver for Windows 3.1. The effort was successful but is not yet complete. Along the way I re-learned many things I had forgotten, and learned several new ones. This blog entry is based on notes I made during development.
Disclaimer: An earlier version of this post claimed the structure is wait-free, this is incorrect. Being wait-free requires that failure or suspension of any thread can’t cause failure or suspension of another thread. This queue in fact does not fulfill that requirement. The main section which discusses the wait…
The planner treats CTEs very differently depending on how you write them. Here's what happens under the hood, version by version, through PostgreSQL 18.
Now that Java can be compiled to WebAssembly with GraalVM, how well Clojure can run in Wasm?
In contrast to the imperative programming paradigm, declarative programming expresses the logic of a computation without explicitly specifying its control flow. That is, declarative programming focuses on the what , not the how . If you have tentatively researched declarative programming before, you have likely read…
Hi, and welcome to The Programmers' Stone. The purpose of this site is to recapture, explore and celebrate the Art of Computer Programming. By so doing we hope to help the reader either become a better programmer, understand what less experienced programmers are struggling with, or communicate more effectively with…
The best performance improvement is the transition from the nonworking state to the working state. (John Ousterhout) Discovering a solution to a mathematical problem is only half of the battle. Ac…
An article about Lisp programming language.
It may not be possible for us to ever reach empirical definitions of "good code" or "clean code", which means that any one person's opinions about another person's opinions about "clean code" are necessarily highly subjective. I cannot review Robert C. Martin's 2008 book Clean Co...
A blog about modern PHP, the web, and programming in general. Follow my newsletter and YouTube channel as well.
Lessons learned from building Codescribble with a little help (and a lot of frustration) from an AI
I have been programming in Lua for about 9 months and it seemed like a good time to pause and reflect on my experience with it. I have used various languages over the years -- Perl ( soaplite.com and other projects, including my current consulting work), C ( a DHCP /DNS server for Arduino and a ping-pong juggling…
Every square has exactly 3 units and 20 peers. For example, here are the units and peers for the square C2 :
This post assumes some basic C skills. Linux puts you in full control. This is not always seen from everyone’s perspective, but a power user loves to be in control. I’m going to show yo…
Before I start this post, let me preface it by saying that I’m not an experienced Rustacean by any means. The excellent foks at /r/rust gave a lot of helpful feedback and cleared up some misconceptions I had. Futher errata and corrections are appreciated. This post is aimed at helping other fledgling rust-learners…
Go was born out of frustration with existing languages and environments for systems programming.
Detailed report on the Thoughtworks AI retreat, should we write a manifesto for AI-enabled development, is spec-driven development the return of waterfall, LLMs perform better in healthy codebases
Something funny happened a little while ago: I read about FreshRSS, and it sounded nice, so I installed it on a server and started using it . That would not have happened a year ago, but then again, a year ago I didn’t have any NixOS servers.
Project Loom aims to drastically reduce the effort of writing, maintaining, and observing high-throughput concurrent applications that make the best use of available hardware.
Open Source Freelancer
Nowadays the most popular programming languages are Python, Javascript, Java, C++, C#, Kotlin and Ruby, and the average programmer is probably familiar with one or more of these languages. It's relatively easy to switch from one to another (barring any framework specific knowledge that may be needed), since they are…
Hello there. I'm going to put together a better site when I get some time, but for now here are some links: my translation of Leonid Andreyev's Short Stories , which you can read online (also available in ebook and paperback editions). More of my translations here . Browse my articles in the archive .
The following submission to Jeremy Friesen’s ‘elevator pitch’-themed Emacs blog carnival is taken from my rather long manuscript in progress (‘the present work’), tent…
Why I'm long on functional programming