You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Pascal program is designed to solve the "Billion Row Challenge." It utilizes multiple threads to efficiently process a large dataset and compute statistics for each unique key. The program makes use of a custom hashmap implementation and performs sorting and combining steps to produce the final results.
5
+
6
+
Usage
7
+
-----
8
+
9
+
To run the program, provide the input file as a command-line argument:
10
+
11
+
`./brows inputfile`
12
+
13
+
Replace `inputfile` with the path to your input file.
14
+
15
+
Program Overview
16
+
----------------
17
+
18
+
The program is structured into several parts:
19
+
20
+
2. **Thread Configuration:**
21
+
22
+
* `THREAD_COUNT`: The number of threads used by the program. It is set to 16 by default.
23
+
24
+
3. **Custom HashMap:**
25
+
26
+
* The program uses a custom hashmap implementation (`TBRMap`) based on either the fast hashmap (`TXQBaseHashmapStr`) or a standard dictionary (`TDictionary`).
27
+
28
+
4. **Sorting Algorithm:**
29
+
30
+
* The program employs a QuickSort algorithm for sorting arrays of pointers.
31
+
32
+
5. **Multithreading:**
33
+
34
+
* The program utilizes multiple threads (`TProcessTextThread` and `TCombineCountersThread`) to process and combine data efficiently.
35
+
36
+
6. **File I/O:**
37
+
38
+
* The input file is memory-mapped (`Fpmmap`) for efficient access and processing.
39
+
40
+
Compilation
41
+
-----------
42
+
43
+
To compile the program, use the Free Pascal Compiler (FPC) with the following command:
44
+
45
+
46
+
`fpc brows.pas`
47
+
48
+
This will generate an executable file named `brows`.
49
+
50
+
License
51
+
-------
52
+
53
+
This program is provided under the GNU Lesser General Public License (LGPL).
54
+
55
+
56
+
Author
57
+
------
58
+
59
+
This program was developed by \[Benito van der Zander\].
60
+
61
+
Feel free to modify and enhance the program according to your needs!
0 commit comments