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/ikelaiah/README.md
+38-3Lines changed: 38 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ The approach I implemented here is simplistic.
6
6
7
7
- Sequentially read the measurement file.
8
8
- Populate a `TDictionary` with station names, min, max, count and sum; without storing all the temperature measurements.
9
-
-Avoided [StrUtil.SplitString](https://www.freepascal.org/docs-html/rtl/strutils/splitstring.html), used [`Pos()`](https://www.freepascal.org/docs-html/rtl/system/pos.html) and [`Copy()`](https://www.freepascal.org/docs-html/rtl/system/copy.html) instead.
9
+
-Format output and sort in `TStringList`.
10
10
- Use a custom comparer to sort the station and temperature statistics in a `TStringList`.
11
11
- Use the rounding method as provided in the `baseline.lpr` (or the `README.md` from 1brc-ObjectPascal).
12
12
- Display the sorted measurements using a simple `for` loop.
@@ -34,6 +34,30 @@ To time the execution, do the following.
*`AssignFile` -> `Reset` -> Parse weather station and the recorded temperature with `TStringHelper.Split` -> `TDictionary` -> `TStringList` -> A `for` loop -> output.
94
+
95
+
* 1.2
96
+
* Revision release - Sequential approach.
97
+
* Replaced `TStringHelper.Split` with `Pos()` and `Copy()`. 2-3 mins faster for 1 billion rows.
98
+
* Float now stored as Int64. 2-3 mins faster for 1 billion rows.
99
+
* Applied baseline's rounding.
100
+
101
+
* 1.3
102
+
* Revision release - Sequential approach.
103
+
* Replaced `AssignFile()` and `Reset()` with `TfileStream` and `TStreamReader`. 3-4 mins faster for 1 billion rows.
0 commit comments