|
1 | | -# Hartmut Grosser # |
| 1 | +# Hartmut Grosser |
2 | 2 |
|
3 | | -# 1 billion row Challenge entry # |
| 3 | +**1 billion row Challenge entry** |
4 | 4 |
|
5 | | -# Version # |
6 | | -Version 1.0 |
| 5 | +## Version |
| 6 | +Version 1.50 |
7 | 7 |
|
8 | | -# How to compile # |
| 8 | +## How to compile |
9 | 9 | The program was developed with FPC 3.2.2 and Lazarus 2.2.4 |
10 | 10 |
|
11 | | -# How to start # |
| 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 | | -There are no switches like '-i' etc, only values. |
| 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 |
19 | 20 |
|
20 | | -# How the program works # |
| 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. |
| 24 | + |
| 25 | +## How the program works |
21 | 26 | The Program works with 1 thread. |
22 | 27 |
|
23 | 28 | 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 |
0 commit comments