Skip to content

Commit 132949f

Browse files
committed
docs (README): Updated with instructions on how to build & run
1 parent 20dace9 commit 132949f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

+25
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,27 @@
11
# llvm-data-structure-benchmarks
2+
23
A benchmark for cache efficient data structures.
4+
5+
Full writeup (explaining the data structures being examined, as well as a discussion of the results) can be [found on my blog](https://tylerayoung.com/?p=1277).
6+
7+
## Compiling & running the easy way
8+
9+
`scripts` contains a Python script that can automate the entire process of building, running, and graphing the output. To use it, you'll need to (once) set up a Python virtual environment like so:
10+
11+
1. `$ cd <path to repo>/scripts`
12+
2. `$ virtualenv env -p python3`
13+
3. `$ env/bin/pip3 install -r package_requirements.txt`
14+
15+
Then, run the script via:
16+
`$ env/bin/python3 benchmark_and_graph.py`
17+
18+
After the program churns for a few minutes, you'll get a new `graphs` directory full of PNGs.
19+
20+
## Compiling & running the hard way
21+
22+
1. `$ cmake CMakeLists.txt`
23+
2. `$ make`
24+
3. `./data_structure_benchmarks > my_output_file.txt`
25+
4. Set up a Python virtual environment in your `scripts` directory as above
26+
5. `$ cd scripts`
27+
6. `$ env/bin/python3 graph_results.py --file my_output_file.txt [--min-elements=N] [--max-elements=M]`

0 commit comments

Comments
 (0)