9
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

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

Last updated at Posted at 2014-01-13

動かしたのは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速い。

9
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?