File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 33** 1 billion row Challenge entry**
44
55## Version
6- Version 1.60
6+ Version 1.61
77
88## How to compile
99The program was developed with FPC 3.2.2 and Lazarus 2.2.4
1010
11- There is a new Conditional "noCR" which is neccessary, if the input file has no CR's
12-
1311## How to start
1412```
1513Usage: <path to input file> <bit-width for hash-list (16..28)>
1614Example: hgrosser measurements.txt 16
15+ - input file: must NOT have CR's (only LF's)
1716 - bit-width for hash-list: sets the size of the hash list, e.g. '16' => 65536 entries
1817```
1918There are no switches like ` -i ` etc, only 2 values.
@@ -40,3 +39,4 @@ To speed things up:
4039- Version 1.50: hash-list optimized, small improvements in parsing the file
4140- Version 1.51: small improvements in asm function
4241- Version 1.60: hash-list optimized, some minor improvements, Conditional "noCR" added
42+ - Version 1.61: Conditional "noCR" constantely enabled => input files must NOT have CR's
Original file line number Diff line number Diff line change 44
55{ $DEFINE XTEST} { please keep this UNDEFINED / compile a safe or a fast program}
66{ $DEFINE XINLINE} { please keep this UNDEFINED / use INLINE for routines or not}
7- { $DEFINE noCR} { neccessary for input-files without CR's (only LF's)}
7+ { $DEFINE noCR} { neccessary for input-files without CR's (only LF's)}
88
99{ $IFDEF XTEST}
1010 { $R+} { $Q+} { $S+} { slow but safe}
2121 sysutils, strutils, math;
2222
2323const
24- M_version = ' 1.60 ' ; { version number}
24+ M_version = ' 1.61 ' ; { version number}
2525
2626{ ------------------------------ Common routines: ------------------------------}
2727
@@ -520,10 +520,7 @@ procedure weatherClass.process_measurements;
520520 begin
521521 Inc(p2, pred(p1)); { p2:=position of 'LF'}
522522 { get cityname and temperature, without CR: }
523- len := p2 - p1
524- { $IFNDEF noCR}
525- - 1 ;
526- { $ENDIF} { '-1' skips the CR}
523+ len := p2 - p1 { $IFNDEF noCR} -1 { $ENDIF} ; { '-1' skips the CR}
527524 city[0 ] := chr(len);
528525 move(s[p1], city[1 ], len);
529526 { extract temperature: }
You can’t perform that action at this time.
0 commit comments