Blogs / Personal blogs

Daniel Lemire

lemire.me

Daniel Lemire is a software performance expert. He ranks among the top 2% of scientists globally (Stanford/Elsevier 2025) and is one of GitHub's top 1000 most followed developers.

Popular posts
87
Total points
15,569
HN comments
9,499
Rank
#41 personal

Visit lemire.me → RSS feedOn Hacker News May 2014 – Sep 2026

Software Engineering 47Systems & Performance 40Math & Algorithms 14Hardware & Electronics 14Society, Policy & Culture 12Tech Industry & Business 8

2

Xor Filters: Faster and Smaller Than Bloom Filters

In software, you frequently need to check whether some objects is in a set. For example, you might have a list of forbidden Web addresses. As someone enters a new Web address, you may want to check whether it is part of your black list. Or maybe you have a large list of already used … Continue reading Xor Filters…

4

Memory access on the Apple M1 processor

When a program is mostly just accessing memory randomly, a standard cost model is to count the number of distinct random accesses. The general idea is that memory access is much slower than most other computational tasks. Furthermore, the cost model can be extended to count "nearby" memory accesses as free. That is…

6

You can beat the binary search

We sometimes have to look for a value in a sorted array. The simplest algorithm consists in just going through the values We sometimes have to look for a value in a sorted array. The simplest algorithm consists in just going through the values one by one, until we encounter the value, or exhaust the … Continue reading…

7

How to Learn Efficiently

I am convinced that much of the gap between the best college students and the worst is explained by study habits. Frankly, most students study poorly. To make matters worse, most teachers are incapable of teaching good study habits. Learning is proportional with effort Sitting in a classroom listening to a professor…

9

Word-Aligned Bloom Filters

Programmers often need to 'filter out' data. Suppose that you are given a database of users where only a small percentage are 'paying customers' (say 5% or less). You can write an SQL query to check whether a given user is indeed a paying customer, but it might require a round trip to your database … Continue reading…

10

Fast UTF-8 validation

One of the most common "data type" in programming is the text string. When programmers think of a string, they imagine that they are dealing with a list or an array of characters. It is often a "good enough" approximation, but reality is more complex. The characters must be encoded into bits in some way. Most ……

11

Simdjson 0.3: Faster JSON parser

Last year (2019), we released the simjson library. It is a C++ library available under a liberal license (Apache) that can parse JSON documents very fast. How fast? We reach and exceed 3 gigabytes per second in many instances. It can also parse millions of small JSON documents per second. The new version is much ……

12

ARM MacBook vs. Intel MacBook: A SIMD Benchmark

In my previous blog post, I compared the performance of my new ARM-based MacBook Pro with my 2017 Intel-based MacBook Pro. I used a number parsing benchmark. In some cases, the ARM-based MacBook Pro was nearly twice as fast as the older Intel-based MacBook Pro. I think that the Apple M1 processor is a breakthrough ……

15

Go generics are not bad

When programming, we often need to write 'generic' functions where the exact data type is not important. For example, you might want to write a simple function that sums up numbers. Go lacked this notion until recently, but it was recently added (as of version 1.18). So I took it out for a spin. In … Continue reading…

21

C23: A Slightly Better C

One of the established and most popular programming languages is the C programming language. It is relatively easy to learn, and highly practical. Maybe surprisingly, the C programming language keeps evolving, slowly and carefully. If you have GCC 13 or LLVM (Clang) 16, you already have a compiler with some of the…

22

Fast base64 encoding and decoding

Computers store data as streams of bits. Binary files like image, audio or video files are allowed to contain just about any sequence of bits. However, we also often use text formats; for example, web pages and emails are required to be text. So how do we send images by email? How do we embed … Continue reading…

27

Cost of a thread in C++ under Linux

Almost all our computers are made of several processing cores. Thus it can be efficient to "parallelize" expensive processing in a multicore manner. That is, instead of using a single core to do all of the work, you divide the work among multiple cores. A standard way to approach this problem is to create threads. ……

29

Hotspot performance engineering fails

Developers often believe that software performance follows a Pareto distribution: 80% of the running time is spent in 20% of the code. Using this model, you can write most of your code without any care for performance and focus on the narrow pieces of code that are performance sensitive. Engineers like Casey Muratori…