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
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,19 +3,24 @@
3
3
**1 billion row Challenge entry**
4
4
5
5
## Version
6
-
Version 1.0
6
+
Version 1.51
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
11
## How to start
12
12
```
13
-
Usage: hgrosser <path to input file> [buffer size in kb (Default=128 kb)]
14
-
Example: hgrosser ./measurements.txt 128
13
+
Usage: <path to input file> <bit-width for hash-list (14..28)>
14
+
Example: hgrosser measurements.txt 15
15
+
- bit-width for hash-list: sets the size of the hash list, e.g. '16' => 65536 entries
15
16
```
16
17
There are no switches like `-i` etc, only values.
17
18
18
-
Please start the program 3 times with buffer sizes of '128', '192' and '256'.
19
+
### Optimizing the 2nd command line parameter
20
+
21
+
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 15 is the fastest way, allthough this causes many collisions.
22
+
23
+
Please (if possible) try all values from 14 to 24 (maybe in a for-loop). Thanks a lot.
19
24
20
25
## How the program works
21
26
The Program works with 1 thread.
@@ -24,5 +29,11 @@ To speed things up:
24
29
25
30
- the input file is read via procedure 'blockread' ...
26
31
- into an AnsiString, so that function 'PosEx' can be used to parse it
27
-
- to manage the city names, a 'TFPHashList' is used
32
+
- to manage the city names, a self made hash-list is used
28
33
- temperatures are stored as integers (multiplied by 10)
34
+
35
+
## History
36
+
37
+
- Version 1.00: initial version
38
+
- Version 1.50: hash-list optimized, small improvements in parsing the file
39
+
- Version 1.51: small improvements in asm function
0 commit comments