On Wed, Feb 19, 2014 at 6:22 AM, Norihiro Tanaka wrote: > for i in $(seq 10); do env LC_ALL=ja_JP.eucJP time src/grep -i n in; done Wow. You're right. With the attached patch, I see a speedup of more than 130x in this case: (fyi, the "time" output is slightly different, because I have installed GNU time) grep-2.17$ for i in $(seq 5); do env LC_ALL=ja_JP.eucJP time grep -i n in; done 2.78 real 2.78 user 0.00 sys 2.73 real 2.73 user 0.00 sys 2.75 real 2.75 user 0.00 sys 2.73 real 2.73 user 0.00 sys 2.74 real 2.74 user 0.00 sys 2.17+patch$ for i in $(seq 5); do env LC_ALL=ja_JP.eucJP time src/grep -i n in; done 0.02 real 0.02 user 0.00 sys 0.02 real 0.02 user 0.00 sys 0.02 real 0.02 user 0.00 sys 0.02 real 0.02 user 0.00 sys 0.02 real 0.02 user 0.00 sys I haven't investigated they "why" yet, but expect that I will make grep-2.18 with just this one performance-improving patch. Thank you, Norihiro, Jim