Hey Y'all,
After correcting my mistake about not using the buffered stream, this is where I'm at.
With buffered stream's capacity of
4*1024:
$ time ./bin/generator -i data/weather_stations.csv -o /tmp/measurements-1_000_000_000.txt -n 1_000_000_000
Input File : /home/gcarreno/Programming/1brc-ObjectPascal/data/weather_stations.csv
Output File: /tmp/measurements-1_000_000_000.txt
Line Count : 1,000,000,000
Building Weather Stations...
Done.
[##################################################] 100.00 % done.
real 20m53.633s
user 20m29.230s
sys 0m24.062s
With buffered stream's capacity of
64*1024:
$ time ./bin/generator -i data/weather_stations.csv -o /tmp/measurements-1_000_000_000.txt -n 1_000_000_000
Input File : /home/gcarreno/Programming/1brc-ObjectPascal/data/weather_stations.csv
Output File: /tmp/measurements-1_000_000_000.txt
Line Count : 1,000,000,000
Building Weather Stations...
Done.
[##################################################] 100.00 % done.
real 20m46.110s
user 20m29.452s
sys 0m16.467s
With buffered stream's capacity of
20*1024*1024:
$ time ./bin/generator -i data/weather_stations.csv -o /tmp/measurements-1_000_000_000.txt -n 1_000_000_000
Input File : /home/gcarreno/Programming/1brc-ObjectPascal/data/weather_stations.csv
Output File: /tmp/measurements-1_000_000_000.txt
Line Count : 1,000,000,000
Building Weather Stations...
Done.
[##################################################] 100.00 % done.
real 20m11.721s
user 19m58.077s
sys 0m13.559s
Nothing of note in the different value of the buffered stream's capacity.
I'll leave it at 64K for the time being.
I'm now gonna attempt to use a
TStringStream to write the values, and then, for every 10k lines, dump it on the buffered stream.
And then, just for the sake of completion, remove the buffered stream as the middle man and see if that brings a difference.
Cheers,
Gus