Home | Notifications | New Note | Local | Federated | Search | Logout

Note Detail


🦉@aaa (2026-09-15 18:57:17)
microsoft製grepのtgrepがripgrepよりも速いと謳われている

user@debian:~/dev/firefox$ time grep -r LeaveLink .
real 0m54.861s
$ time rg LeaveLink .
real 0m0.652s
user 0m2.746s
sys 0m4.931s
$ time ~/Downloads/tgrep LeaveLink .
real 0m9.456s
$ time ~/Downloads/tgrep index .
real 0m35.756s
$ time ~/Downloads/tgrep LeaveLink .
real 0m0.326s
user 0m0.251s
sys 0m0.072s

trigramインデックスを貼って真価を発揮するっぽい。
インデックス貼るなら他よりも速いのは当然感あるなー。
今の自分にはrgが十分速くて手軽だからこのままrgを使いそうだけど、用途(firefoxより大きいもの..)によってはtgrepが速くてエコな、自然な選択肢になるのかも
Reply