2012/3/19 Chet Ramey <chet.ra...@case.edu>: > I will look at optimizing that function, but it's always going to take time > to plow through 300K when you have to split it into words. (There's not > actually any word splitting of consequence happening with your second > example using the pipeline.)
Letting compgen do the command substitution speeds it up considerably $ TIMEFORMAT=%R $ time compgen -W "`seq 1 500000`" 1794 >/dev/null 175.253 $ time compgen -W '`seq 1 500000`' 1794 >/dev/null 2.347 -- Geir Hauge