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
Copy file name to clipboardExpand all lines: entries/hgrosser/README.md
+20-9Lines changed: 20 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,28 +3,37 @@
3
3
**1 billion row Challenge entry**
4
4
5
5
## Version
6
-
Version 1.61
6
+
Version 2.00 (first version with threads)
7
7
8
8
## How to compile
9
9
The program was developed with FPC 3.2.2 and Lazarus 2.2.4
10
10
11
+
1brc.lpi + 1brc.pas = version without threads
12
+
13
+
1brc_th.lpi + 1brc_th.pas = version with threads
14
+
11
15
## How to start
12
16
```
13
-
Usage: <path to input file> <bit-width for hash-list (16..28)>
14
-
Example: hgrosser measurements.txt 16
15
-
- input file: must NOT have CR's (only LF's)
16
-
- bit-width for hash-list: sets the size of the hash list, e.g. '16' => 65536 entries
17
+
Usage: <path to input file> <thread count> [<bit-width for hash-list> [buffer size in KB]]
18
+
- thread count: allowed range = [1..32]
19
+
- bit-width for hash-list: sets the size of the hash list, e.g. '16' => 65536 entries,
20
+
allowed range = [16..28], Default=18
21
+
- buffer size in KB: allowed range = [1..2,000,000 KB], Default=128 KB
22
+
Example: hgrosser measurements.txt 32 18 128
17
23
```
18
-
There are no switches like `-i` etc, only 2 values.
24
+
There are no switches like `-i` etc, only 2..4 values.
19
25
20
26
### Optimizing the 2nd command line parameter
27
+
This parameter sets the thread count. With my own old CPU I could only test 1..4 threads. Although I expect 32 threads to be the fastest, I would be very interested to see the results for 1, 4, 8, 16 and 32 threads. Please use for this test the defaults for the 3rd and 4th command line parameters.
21
28
22
-
In theory the program should run faster with greater bit-widths for the hash-list (because of less collisions), but on my own computer (8 GB RAM) in praxis a small value of 16 is the fastest way, allthough this causes many collisions.
29
+
### Optimizing the 3rd command line parameter
30
+
In theory the program should run faster with greater bit-widths for the hash-list (because of less collisions). On the computer of Gus - without threads - 18 bits was the fastest. Please try the values from 16 to 20 again and use '32' for the 2nd command line parameter and the default for the 4th command line parameter.
23
31
24
-
Please (if possible) try all values from 16 to 22 (maybe in a for-loop). Thanks a lot.
32
+
### Optimizing the 4th command line parameter
33
+
After the 2nd and 3rd command line parameters had been optimized, please try with them 64, 96, 128, 192 and 256 KB as the 4th command line parameter. Thanks a lot!
25
34
26
35
## How the program works
27
-
The Program works with 1 thread.
36
+
The Program works with multi threads.
28
37
29
38
To speed things up:
30
39
@@ -40,3 +49,5 @@ To speed things up:
40
49
- Version 1.51: small improvements in asm function
41
50
- Version 1.60: hash-list optimized, some minor improvements, Conditional "noCR" added
42
51
- Version 1.61: Conditional "noCR" constantely enabled => input files must NOT have CR's
0 commit comments