
18 Jun
2008
18 Jun
'08
2:38 p.m.
On Wed, Jun 18, 2008 at 11:23:00AM -0700, Stefan O'Rear wrote:
GNU 'sort' uses an external sort algorithm. You can, with 200M of memory, give it a 50G input file, and it will work. This might explain the difference..
But the input files are both < 10 mb ... If I create a 'big_bible' file like 'cat bible bible | dd of=big_bible count=1 bs=SIZE_OF_BRACKETS' then the timings are: time sort < big_bible > /dev/null # ~ 1.2 s time ./sort < big_bible > /dev/null # ~ 0.8 s I.e. the difference here is like a low constant factor, and not like a factor of 1000 with the brackets. Best regards Georg Sauthoff -- Fortune : 'Real programmers don't comment their code. It was hard to write, it should be hard to understand.' ;)