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
The text file contains temperature values for a range of weather stations. Each row is one measurement in the format `<string: station name>;<double: measurement>`, with the measurement value having exactly one fractional digit.
20
+
The text file contains temperature values for a range of weather stations. Each row is one measurement in the format `<string: station name>;<double: measurement>`, with the measurement value having exactly one fractional digit. Rows are separated by a single line feed equal of LF (ascii 10) for consistency with the original challenge - and not CR+LF (ascii 13+10) any more.
Copy file name to clipboardExpand all lines: entries/ghatem-fpc/README.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -224,3 +224,12 @@ I implemented my own Dictionary class consisting of two arrays. We compute the m
224
224
225
225
edit:
226
226
quadratic probing improved performance even further. we could probably do better with 2-level hashing, but finding such a hash function is going to take a lot of trials, this is probably acceptable results
227
+
228
+
**ACTUAL TIMING (busy machine): ~4 seconds as per gcarreno**
229
+
230
+
## v.4 (2024-04-24)
231
+
232
+
a few performance improvements, and measurements as per gcarreno on a busy machine:
233
+
- using mORMot's `crc32c` function instead of the native `crc32`, time dropped to 3.8 seconds
234
+
- I had removed my pre-allocated records implementation. restored it in the custom dictionary class, time dropped to 3.2 seconds
235
+
- skipping a few chars that we don't need to bother with, no timing yet
Copy file name to clipboardExpand all lines: entries/hgrosser/README.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,24 +3,26 @@
3
3
**1 billion row Challenge entry**
4
4
5
5
## Version
6
-
Version 1.51
6
+
Version 1.60
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
+
There is a new Conditional "noCR" which is neccessary, if the input file has no CR's
12
+
11
13
## How to start
12
14
```
13
-
Usage: <path to input file> <bit-width for hash-list (14..28)>
14
-
Example: hgrosser measurements.txt 15
15
+
Usage: <path to input file> <bit-width for hash-list (16..28)>
16
+
Example: hgrosser measurements.txt 16
15
17
- bit-width for hash-list: sets the size of the hash list, e.g. '16' => 65536 entries
16
18
```
17
-
There are no switches like `-i` etc, only values.
19
+
There are no switches like `-i` etc, only 2 values.
18
20
19
21
### Optimizing the 2nd command line parameter
20
22
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.
23
+
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.
22
24
23
-
Please (if possible) try all values from 14 to 24 (maybe in a for-loop). Thanks a lot.
25
+
Please (if possible) try all values from 16 to 22 (maybe in a for-loop). Thanks a lot.
24
26
25
27
## How the program works
26
28
The Program works with 1 thread.
@@ -37,3 +39,4 @@ To speed things up:
37
39
- Version 1.00: initial version
38
40
- Version 1.50: hash-list optimized, small improvements in parsing the file
39
41
- Version 1.51: small improvements in asm function
42
+
- Version 1.60: hash-list optimized, some minor improvements, Conditional "noCR" added
0 commit comments