7/1/2023 0 Comments Ripgrep gui![]() Global Time = 6.948 = 100% Physical Memory = 4096 MB Process Time = 6.953 = 100% Virtual Memory = 26 MB Process Time = 17.750 = 99% Virtual Memory = 2 MB Global Time = 5.582 = 100% Physical Memory = 514 MBį:\grep_vs_Kazahana>timer32.exe grep.exe -F -c "Now, Hercules and his little friends won't stand a chance" "OpenSubtitle_corpus_en_2018_(441,450,449_lines_FROM_446,612_files).txt" Process Time = 37.812 = 677% Virtual Memory = 515 MB Global Time = 4.627 = 100% Physical Memory = 514 MBį:\grep_vs_Kazahana>timer32.exe "Kazahana_r1- fix nowait_critical_nixFIX_WolfRAM fixITER EX CS_fix_DEFINE_Trolldom_HEXADECAD-Threads_IntelV15_SSE41_64bit.exe" "Now, Hercules and his little friends won't stand a chance" "OpenSubtitle_corpus_en_2018_(441,450,449_lines_FROM_446,612_files).txt" 520123 Process Time = 8.734 = 188% Virtual Memory = 513 MB Process Time = 4.937 = 100% Virtual Memory = 511 MB Global Time = 4.940 = 100% Physical Memory = 512 MBį:\grep_vs_Kazahana>timer32.exe "Kazahana_r1- fix nowait_critical_nixFIX_WolfRAM fixITER EX CS_fix_DEFINE_Trolldom_MONAD-Thread_IntelV15_SSE41_64bit.exe" "Now, Hercules and his little friends won't stand a chance" "OpenSubtitle_corpus_en_2018_(441,450,449_lines_FROM_446,612_files).txt" 520123 Process Time = 4.921 = 99% Virtual Memory = 511 MB Process Time = 5.453 = 99% Virtual Memory = 512 MB Testfile: 13,113,340,782 OpenSubtitle_corpus_en_2018_(441,450,449_lines_FROM_446,612_files).txtīenchmarking literal (Exact Matching) "Now, Hercules and his little friends won't stand a chance". exact matching) with Kazahana is superior, why, because the tool has the fastest memmem() function.Ī quick example, on laptop with i7-3630QM: , no other tool obviously stands above ripgrep in either performance or correctness. For example, to search for all lines that contain query and string you can use rg query | rg string. The ability to search by file type gets some getting used to (tip! use: rg -type-list) and remember that you can pipe rg output to another rg. ![]() It's written in Rust and so far I haven't had a single crash, ever. Remember that it has a lot of cool features that are well worth learning. ![]() I installed it with brew install ripgrep and the best way to learn how to use it is rg -help. That's useful when you want to search in your own source as well as the files in node_modules. ![]() But with ripgrep I can just add -no-ignore-vcs and it searches in all the files mentioned in. Granted, almost all my git repos are small enough that regular git grep is faster than I can perceive many times. That alone, was a huge step up from regular grep. I used to use git grep whenever I was inside a git repo and sift for everything else. Tools that search many files at once are generally slower if they use memory maps, not faster. Ripgrep is the only tool with proper Unicode support that doesn’t make you pay dearly for it. If you don't believe me, either read this detailed blog post from its author or just jump straight to the conclusion:įor both searching single files and huge directories of files, no other tool obviously stands above ripgrep in either performance or correctness. Faster than sift, git grep, ack, regular grep etc. ![]()
0 Comments
Leave a Reply. |