Skip to content

Commit c60e034

Browse files
committed
initial version 1.0
1 parent fbb6b17 commit c60e034

File tree

3 files changed

+651
-0
lines changed

3 files changed

+651
-0
lines changed

entries/hgrosser/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# 1 billion row Challenge entry by Hartmut Grosser #
2+
3+
# Version #
4+
Version 1.0
5+
6+
# How to compile #
7+
The program was developed with FPC 3.2.2 and Lazarus 2.2.4
8+
9+
# How to start #
10+
```
11+
Usage: hgrosser <path to input file> [buffer size in kb (Default=128 kb)]
12+
Example: hgrosser ./measurements.txt 128
13+
```
14+
There are no switches like '-i' etc, only values.
15+
16+
Please start the program 3 times with buffer sizes of '128', '192' and '256'.
17+
18+
# How the program works #
19+
The Program works with 1 thread.
20+
21+
To speed things up:
22+
23+
- the input file is read via procedure 'blockread' ...
24+
- into an AnsiString, so that function 'PosEx' can be used to parse it
25+
- to manage the city names, a 'TFPHashList' is used
26+
- temperatures are stored as integers (multiplied by 10)

entries/hgrosser/src/1brc.lpi

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<CONFIG>
3+
<ProjectOptions>
4+
<Version Value="12"/>
5+
<PathDelim Value="\"/>
6+
<General>
7+
<Flags>
8+
<MainUnitHasCreateFormStatements Value="False"/>
9+
<MainUnitHasTitleStatement Value="False"/>
10+
<MainUnitHasScaledStatement Value="False"/>
11+
<CompatibilityMode Value="True"/>
12+
</Flags>
13+
<SessionStorage Value="InIDEConfig"/>
14+
<Title Value="1brc"/>
15+
<UseAppBundle Value="False"/>
16+
<ResourceType Value="res"/>
17+
</General>
18+
<i18n>
19+
<EnableI18N LFM="False"/>
20+
</i18n>
21+
<BuildModes Count="1">
22+
<Item1 Name="Default" Default="True"/>
23+
</BuildModes>
24+
<PublishOptions>
25+
<Version Value="2"/>
26+
</PublishOptions>
27+
<RunParams>
28+
<local>
29+
<LaunchingApplication Use="True" PathPlusParams="\usr\bin\python3 \usr\bin\gnome-terminal -t &apos;Lazarus Run Output&apos; -- $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
30+
</local>
31+
<FormatVersion Value="2"/>
32+
<Modes Count="1">
33+
<Mode0 Name="default">
34+
<local>
35+
<LaunchingApplication Use="True" PathPlusParams="\usr\bin\python3 \usr\bin\gnome-terminal -t &apos;Lazarus Run Output&apos; -- $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
36+
</local>
37+
</Mode0>
38+
</Modes>
39+
</RunParams>
40+
<Units Count="1">
41+
<Unit0>
42+
<Filename Value="1brc.pas"/>
43+
<IsPartOfProject Value="True"/>
44+
</Unit0>
45+
</Units>
46+
</ProjectOptions>
47+
<CompilerOptions>
48+
<Version Value="11"/>
49+
<Target>
50+
<Filename Value="../../../bin/hgrosser"/>
51+
</Target>
52+
<SearchPaths>
53+
<IncludeFiles Value="$(ProjOutDir)"/>
54+
<UnitOutputDirectory Value="../../../bin/lib/$(TargetCPU)-$(TargetOS)"/>
55+
</SearchPaths>
56+
<Parsing>
57+
<SyntaxOptions>
58+
<SyntaxMode Value="tp"/>
59+
</SyntaxOptions>
60+
</Parsing>
61+
<CodeGeneration>
62+
<Checks>
63+
<IOChecks Value="True"/>
64+
<RangeChecks Value="True"/>
65+
<OverflowChecks Value="True"/>
66+
<StackChecks Value="True"/>
67+
</Checks>
68+
<VerifyObjMethodCallValidity Value="True"/>
69+
</CodeGeneration>
70+
</CompilerOptions>
71+
<Debugging>
72+
<Exceptions Count="3">
73+
<Item1>
74+
<Name Value="EAbort"/>
75+
</Item1>
76+
<Item2>
77+
<Name Value="ECodetoolError"/>
78+
</Item2>
79+
<Item3>
80+
<Name Value="EFOpenError"/>
81+
</Item3>
82+
</Exceptions>
83+
</Debugging>
84+
</CONFIG>

0 commit comments

Comments
 (0)