1
1
mirror of https://github.com/walles/moar.git synced 2024-11-26 04:21:11 +03:00
moar/sample-files
Johan Walles 5e847f4cd7 Improve large file reading performance by 10%
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.
2021-05-03 20:33:25 +02:00
..
8-bit-color.txt Add sample file for color handling 2019-10-28 21:54:57 +01:00
compressed.txt.bz2 Add (failing) compressed-files tests 2019-06-23 21:30:11 +02:00
compressed.txt.gz Add (failing) compressed-files tests 2019-06-23 21:30:11 +02:00
compressed.txt.xz Add (failing) compressed-files tests 2019-06-23 21:30:11 +02:00
dos.txt Reboot in Go 2019-06-08 22:12:52 +02:00
empty Dodge corner case issue 2019-07-15 18:49:25 +02:00
gitdiff-color.txt Reboot in Go 2019-06-08 22:12:52 +02:00
hej.txt Reboot in Go 2019-06-08 22:12:52 +02:00
large-git-log-patch.txt Reboot in Go 2019-06-08 22:12:52 +02:00
line-without-newline.txt Add another test case 2019-11-19 14:47:44 +01:00
long-and-wide.txt Reboot in Go 2019-06-08 22:12:52 +02:00
long.txt Reboot in Go 2019-06-08 22:12:52 +02:00
man-page-overstrike.txt Reboot in Go 2019-06-08 22:12:52 +02:00
no-ending-newline.txt Reboot in Go 2019-06-08 22:12:52 +02:00
normal-and-bright-colors.txt Support SGR codes 90-97, bright colors 2020-04-22 21:39:58 +02:00
short.txt Reboot in Go 2019-06-08 22:12:52 +02:00
test.log Reboot in Go 2019-06-08 22:12:52 +02:00
two-lines-no-trailing-newline.txt Improve large file reading performance by 10% 2021-05-03 20:33:25 +02:00
two-lines.txt Reboot in Go 2019-06-08 22:12:52 +02:00
utf8.txt Reboot in Go 2019-06-08 22:12:52 +02:00
very-long-line.txt Make start of line identifiable 2019-11-19 16:21:58 +01:00
with-tabs.c Reboot in Go 2019-06-08 22:12:52 +02:00