Standard I/O
BLOCK_SIZE Time to read
----------- ------------
1 42.8 s
1000 42.5 s
10,000 36.1 s
100,000 11.7 s
1,000,000 8.5 s
10,000,000 8.3 s
ReadLn only 7.8 s
Using SetTextBuf with varied BUFFER_SIZE:
BUFFER_SIZE BLOCK_SIZE Time to read
----------- ---------- ------------
1 kB 10,000,000 5.1 s
1 MB 10,000,000 4.0 s
16 MB 10,000,000 3.9 s
1 kB ReadLn only 4.7 s
1 MB ReadLn only 3.6 s
16 MB ReadLn only 3.6 s