[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep extremely slow on OSX
From: |
Titus von der Malsburg |
Subject: |
grep extremely slow on OSX |
Date: |
Fri, 5 Feb 2010 14:43:09 +0100 |
Hi list!
When I do a simple grep on a 50Mb file with ~1.3 million lines, it
takes 2s on Linux (Ubuntu karmic with stock kernel, 2.6.31-17) and
~12min on OSX (v. 10.5.8):
grep '^[0-9]' < file.dat > /dev/null
~1.2 million lines actually begin with a number. Both systems run on
a Core 2 Duo CPU at 2.2 GHz and have 2GB of RAM. On both systems, I
use utf-8 encoding (en_US.UTF-8).
I wrote a simple C program that matches lines that begin with a number
to see if the problem lies with IO. This programm takes ~1.5s on
Linux and ~1s on OSX.
Does anybody have an idea what the cause of the problem on OSX might
be? And how can it be fixed?
Many thanks for any suggestions!
Titus
- grep extremely slow on OSX,
Titus von der Malsburg <=
Re: grep extremely slow on OSX, Jim Meyering, 2010/02/06