New

The latest blog posts to take off on Hacker News. 2,851 posts.

Math & Algorithms
Any year
399

Sorting algorithms with CUDA

Building on my previous post on sorting algorithms, I implemented the same algorithms using CUDA to explore performance improvements through parallel computing. The goal is to see how we can leverage the power of parallel computing to speed up our sorting algorithms. I went for a NVIDIA recruiting event some days ago…

408

Rediscovering Quaternions

How do we represent a rotation in 3 dimensions? This is a surprisingly deep question, and one we can learn a lot from. Our goal will be to “rediscover” quaternions from first principles, building them up by exploring different representations and fixing the failures along the way.

418

Relaxed Radix Balanced Trees (2024)

I’m adding immutable vectors to my language, Ivan, and needed to pick a suitable data structure to implement them. Clojure uses Persistent Vectors (PVs) which support lookups, updates, and appends all in ‘effectively’ constant time. However, it doesn’t have efficient insert or merge operations. Relaxed Radix Balanced…

420

XOR

Recently I was called on to explain the ‘XOR’ operator to somebody who vaguely knew of its existence, but didn’t have a good intuition for what it was useful for and how it behaved.