Skip to content

Commit e02bf1f

Browse files
authored
Merge pull request #161 from georges-hatem/main
migrate changes to the large-rec version
2 parents 8844e57 + 8f7c4e2 commit e02bf1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ TBRCDictionary = class
8989
destructor Destroy; override;
9090

9191
// simple wrapper to find station-record pointers
92-
function TryGetValue (const aKey: Cardinal; const aThreadNb: TThreadCount; out aValue: PStationData): Boolean;
92+
function TryGetValue (const aKey: Cardinal; const aThreadNb: TThreadCount; out aValue: PStationData): Boolean; {$IFNDEF VALGRIND} inline; {$ENDIF}
9393

9494
// multithread-unprotected: adds a firstly-encountered station-data (temp, name)
9595
procedure Add (const aHashIdx: THashSize; const aThreadNb: TThreadCount; const aTemp: SmallInt; const aStationName: AnsiString); {$IFNDEF VALGRIND} inline; {$ENDIF}
@@ -569,7 +569,7 @@ procedure TOneBRC.GenerateOutput;
569569
begin
570570
vStream := TStringStream.Create;
571571
vStations := TStringList.Create;
572-
vStations.Capacity := cDictSize;
572+
vStations.Capacity := cNumStations;
573573
vStations.UseLocale := False;
574574
try
575575
vStations.BeginUpdate;

0 commit comments

Comments
 (0)