Skip to content


Subversion checkout URL

You can clone with
Download ZIP
This is a repository for the code posted on my blog
C++ Java C Other
Latest commit 98e3c99 @lemire Probably ok.
Failed to load latest commit information.
2010 Minor portability update
2011 Fixing how time is measured
2012 Missing include
2013 Fix
2015/01/08 Unary encoding: remove unused variable
extra Probably ok.
README blog post appeared


Code used on Daniel Lemire's blog

by D. Lemire


This code is meant to illustrate ideas
that I present on my blog. Don't expect or
ask for industrial-strength software. It is
experimental code: it can be wrong, slow, poorly
coded and poorly documented.

I do maintain some software meant for actual
use, with bona fide unit testing and documentation.
The code here does not fit in this category.

== Corresponding blog posts ==

Code is provided in support of the following blog posts:
  Data alignment for speed: myth or reality?

  Fast bitmap decoding
  Bit packing is fast, but integer logarithm is slow

  How fast is bit packing?

  Bitmaps are surprisingly efficient

  Use random hashing if you care about security?

  The language interpreters are the new machines

  3 surprising facts about the computation of scalar products

  Make your own programmable digital thermometer in an hour

  For your in-memory databases, do you really need an index?"

  Is multiplication slower than addition?

  Sorting is fast and useful

== languages ==

You'll find code written in :

- C
- C++
- Java
- Python

and possibly other languages.

== licensing ==

Unless otherwise stated, I make no copyright claim
on this code: you may consider it to be in the public

Don't bother forking this code: just steal it.
Something went wrong with that request. Please try again.