mirror of
https://github.com/walles/moar.git
synced 2024-11-30 22:32:42 +03:00
5e847f4cd7
By reading the file in two passes. The first pass just counts the lines in the file. The second pass starts by preallocating the correct number of lines, and then reads the file. The whole time saving comes from not having to dynamically resize the lines slice while reading the file. |
||
---|---|---|
.. | ||
8-bit-color.txt | ||
compressed.txt.bz2 | ||
compressed.txt.gz | ||
compressed.txt.xz | ||
dos.txt | ||
empty | ||
gitdiff-color.txt | ||
hej.txt | ||
large-git-log-patch.txt | ||
line-without-newline.txt | ||
long-and-wide.txt | ||
long.txt | ||
man-page-overstrike.txt | ||
no-ending-newline.txt | ||
normal-and-bright-colors.txt | ||
short.txt | ||
test.log | ||
two-lines-no-trailing-newline.txt | ||
two-lines.txt | ||
utf8.txt | ||
very-long-line.txt | ||
with-tabs.c |