ag
ack
pt

agとackとptを全部入れて比較してみた

More than 3 years have passed since last update.

動かしたのはEC2のt1.mediumインスタンス。

まずはack

[ec2-user@***:~/golang]$ time ack my_ -l                                                                                                      (r:0 s:6 j:0)

doc/go_faq.html
src/pkg/html/template/escape_test.go
src/pkg/go/printer/testdata/declarations.golden
src/pkg/go/printer/testdata/declarations.input
src/pkg/debug/dwarf/testdata/typedef.c
src/pkg/debug/dwarf/type_test.go
src/pkg/syscall/types_linux.go
src/pkg/runtime/sys_darwin_386.s
src/pkg/runtime/sys_darwin_amd64.s
misc/cgo/test/issue4273b.c
ack my_ -l (real: 1.763 user: 1.384 sys: 0.252 cpu: 92% pf: 0)

次にag

[ec2-user@***-:~/golang]$ time ag my_ -l                                                                                                       (r:0 s:6 j:0)

doc/go_faq.html
src/pkg/html/template/escape_test.go
src/pkg/go/printer/testdata/declarations.golden
src/pkg/go/printer/testdata/declarations.input
src/pkg/debug/dwarf/testdata/typedef.c
src/pkg/debug/dwarf/type_test.go
src/pkg/syscall/types_linux.go
src/pkg/runtime/sys_darwin_386.s
src/pkg/runtime/sys_darwin_amd64.s
misc/cgo/test/issue4273b.c
ag my_ -l (real: 0.262 user: 0.128 sys: 0.128 cpu: 97% pf: 0)

ec2-user@ip-172-31-18-203:~]$ time pt my_ golang -l                                                                                                       (r:0 s:1 j:0)

golang/doc/go_faq.html
golang/misc/cgo/test/issue4273b.c
golang/src/pkg/debug/dwarf/testdata/typedef.c
golang/src/pkg/debug/dwarf/type_test.go
golang/src/pkg/go/printer/testdata/declarations.golden
golang/src/pkg/go/printer/testdata/declarations.input
golang/src/pkg/html/template/escape_test.go
golang/src/pkg/runtime/sys_darwin_386.s
golang/src/pkg/runtime/sys_darwin_amd64.s
golang/src/pkg/syscall/types_linux.go
pt my_ golang -l (real: 0.840 user: 0.576 sys: 0.256 cpu: 99% pf: 0)

だいたい10倍くらいag速い。