-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
51 lines (42 loc) · 1.83 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Trie Project
- Author: Elias Nijs
- Startdate: 2022-11-13
Folder structure
- 'benchmarks/' contains a benchmarking program
- 'build/' contains the output of './build.sh'
- 'src/' contains the trie implementations
- 'data/' contains files produces by the programs
- 'extra/' contains a report and performance analysis
- 'include/' contains the headfiles of the differen tries
- 'resources/' contains all files used by the programs
- 'tests/' contains a testing program
- 'utils/' contains some base files used by both the testing and
benchmarking program
Building and Running
- Build everything with './build.sh'
- 'build.sh' will:
1. compile all the tries and put them in a static library
'build/libtries.a'
2. compile the test program
3. compile the benchmark program
- Run the test program with:
'build/tests <trie>'
- Run the benchmark program with:
'build/benchmarks <trie> <filepath> <benchmarkindex>'
To run a benchmark on multiple files, you could for example do the following:
'wc -l resources/* | head -n -1 | sort -n | sed "s/.* //"
| xargs -i build/benchmarks array {} 1'
Design of the program
- In every descision speed was given priority over memory usage.
- The programming style followed is largely based on the following sources:
1. https://git.sr.ht/~sircmpwn/cstyle
2. http://doc.cat-v.org/bell_labs/pikestyle
3. https://suckless.org/coding_style/
- I experimented in this program with function pointers.
Other
- Both a pooling allocator and memory arena allocator were made. Unfortunately
these couldn't by used in the final result because the the function
definitions couldn't be changed for the assignment. In the final result these
are removed. They will, however, still be used for benchmarking.
- A custom testing system was used. This system is still a work in progress,
especially the terminal ui part.