Skip to content

Commit 496f686

Browse files
committed
why were we casting to string in the first place?
1 parent d0545a4 commit 496f686

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

entries/ghatem-fpc/src/OneBRC-dirty.lpr

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,8 @@ function RoundExInteger (const aTemp: Double): Integer; inline;
263263
{ TOneBRC }
264264

265265
function Compare(AList: TStringList; AIndex1, AIndex2: Integer): Integer;
266-
var
267-
Str1, Str2: String;
268266
begin
269-
Str1 := AList.Strings[AIndex1];
270-
Str2 := AList.Strings[AIndex2];
271-
Result := CompareStr(Str1, Str2);
267+
Result := CompareStr(AList.Strings[AIndex1], AList.Strings[AIndex2]);
272268
end;
273269

274270
procedure TOneBRC.ExtractLineData(const aStart: Int64; const aEnd: Int64; out aLength: ShortInt; out aTemp: SmallInt);
@@ -527,7 +523,6 @@ procedure TOneBRC.GenerateOutput;
527523
vStations.Add(iStationName);
528524
end;
529525
vStations.EndUpdate;
530-
//vStations.AddStrings(FDictionary.FStationNames);
531526
vStations.CustomSort (@Compare);
532527

533528
I := 0;

0 commit comments

Comments
 (0)