The infamous "useless use of cat"
Not useless at all.
time < title_complete_json.txt grep tt9184994
As it happens, when benchmarking grep-like tools on large files, this is actually somewhat likely to make a significant difference since the "useless" use of cat actually forces the file to be read sequentially as a stream (because it's piped through), while a process receiving a file on standard input can treat it as a file and e.g. mmap it.Thanks for your tip, it's clearly the best of both worlds for this purpose.
$ time rg QZQZQZQZ < subtitles.en.txt
real 1.842
user 0.552
sys 1.287
maxmem 9 MB
faults 0
$ time rg QZQZQZQZ subtitles.en.txt
real 1.210
user 0.776
sys 0.433
maxmem 9510 MB
faults 0
(See my other comments in this thread for where to get subtitles.en.txt.)time grep tt9184994 < title_complete_json.txt >> result
time grep tt9184994 title_complete_json.txt >> result