An open API service indexing awesome lists of open source software.

https://github.com/schani/linbin

Linear vs binary search benchmark
https://github.com/schani/linbin

Last synced: 3 months ago
JSON representation

Linear vs binary search benchmark

Awesome Lists containing this project

README

        

Exploring Linear vs Binary Search
=================================

First, read this:

http://schani.wordpress.com/2010/04/30/linear-vs-binary-search/

To run the benchmarks, do

make
./bench.py >out

This will take a few hours and should run on an unloaded machine. The
results will be in the file "out".

You can then visualize the results with

./genplot.py

This will test the given algorithm on array sizes up to MAX-N.

To time an algorithm, use

time ./searchtest

This will run the given number of random searches with the given
algorithm on an array of size N.

To get a list of all the algorithms, do

./searchtest --list