0

I wanted to try to speed up my already fast grep. I read that changing lc_all from utf to c was supposed to do this. However, it gives no speedup. What might the reasons be? How do I "debug" this?

Might caching of the file be the reason (do not have sudo access so can't clear the file from memory)?

  • 1
    Depends on your regexp. For some simple regexp (like grep foo), grep won't need to parse UTF-8, so will behave the same with LC_ALL=C – Stéphane Chazelas Apr 8 '15 at 20:51
  • What environment variable did you set exactly? It's LC_ALL, not lc_all. Environment variables are case-sensitive. What is the output of locale before and after setting the environment variable(s) that you changed? – Gilles Apr 8 '15 at 22:42
  • @Stéphane Chazelas That might be it. I search for a simple "^chr1\b". – The Unfun Cat Apr 9 '15 at 4:02
  • @Gilles I used LC_ALL. I forgot to write it properly in the Q. Sorry. – The Unfun Cat Apr 9 '15 at 4:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.