MattPD / arraylayout

Experiments with the Van Emde Boas ordered array layout

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

doi

arraylayout

Experiments with memory layouts for binary search

About

This project is about trying different memory layouts for searching in an array, with a focus on improving performance for the most common-case: When the input fits entirely in RAM. The layouts we try are:

  1. sorted: The usual sorted array on which we apply binary search
  2. eytzinger: The Eytzinger (or BFS) layout most commonly used implicit binary heaps
  3. btree: A (B+1)-ary variant of the Eytzinger layout
  4. veb: The van Emde Boas layout from the cache-oblivious literature

Quick start

To run an experiment on your own (linux) machine (with g++ installed):

cd src
make main
./main uint32 uint32 100000000 10000000

This will test the cost of performing ten million searches in an array of one hundred million integers. You'd better have at least 800MB of free RAM, which you can check with

free -h

Results

A webpage with some collected results is being maintained here:

http://cglab.ca/~morin/misc/arraylayout-v2/

About

Experiments with the Van Emde Boas ordered array layout


Languages

Language:TeX 55.3%Language:C++ 12.9%Language:Assembly 12.9%Language:Jupyter Notebook 11.0%Language:Python 6.4%Language:Makefile 1.1%Language:Shell 0.4%