beyondgrep / ack2

**ack 2 is no longer being maintained. ack 3 is the latest version.**
https://github.com/beyondgrep/ack3/
Other
1.48k stars 138 forks source link

-Ax and -Bx and -Cx make things significantly slower. #487

Closed petdance closed 7 years ago

petdance commented 10 years ago

I was searching for something like:

ack -A10 'sub foo'

An -A10 takes longer than -A1, but not much. -B is even worse.

$ time ack nonexistentstring
real    0m3.814s
user    0m3.622s
sys     0m0.177s

$ time ack -A1 nonexistentstring
real    0m8.867s
user    0m8.684s
sys     0m0.175s

$ time ack -A10 nonexistentstring
real    0m9.004s
user    0m8.800s
sys     0m0.202s

$ time ack -B1 nonexistentstring
real    0m9.586s
user    0m9.371s
sys     0m0.215s

$ time ack -B10 nonexistentstring
real    0m9.522s
user    0m9.318s
sys     0m0.200s
petdance commented 7 years ago

This was released in 2.16.