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
- Host: GitHub
- URL: https://github.com/schani/linbin
- Owner: schani
- License: mit
- Created: 2010-03-27T14:36:30.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2019-12-12T14:49:04.000Z (over 5 years ago)
- Last Synced: 2025-03-18T07:01:31.491Z (3 months ago)
- Language: C
- Homepage:
- Size: 574 KB
- Stars: 41
- Watchers: 5
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README
- License: LICENSE
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 >outThis 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