File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -564,6 +564,8 @@ procedure TOneBRC.GenerateOutput;
564564 vHash: Cardinal;
565565 vStations: TStringList;
566566 iStationName: AnsiString;
567+ vIdx: THashSize;
568+ vRes: Boolean;
567569begin
568570 vStream := TStringStream.Create;
569571 vStations := TStringList.Create;
@@ -587,7 +589,10 @@ procedure TOneBRC.GenerateOutput;
587589 // would it be more efficient to store the hash as well?
588590 // debatable, and the whole output generation is < 0.3 seconds, so not exactly worth it
589591 vHash := crc32c(0 , @vStations[i][1 ], Length (vStations[i]));
590- FDictionary.TryGetValue(vHash, 0 , vData);
592+
593+ FDictionary.InternalFind (vHash, vRes, vIdx);
594+ vData := @FDictionary.FThreadData[0 ][FDictionary.FIndexes[vIdx]];
595+
591596 vMean := RoundExInteger(vData^.Sum/vData^.Count/10 );
592597
593598 vStream.WriteString(
You can’t perform that action at this time.
0 commit comments