bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] sort: Add --threads option, which parallelizes internal sort


From: Chen Guo
Subject: Re: [PATCH] sort: Add --threads option, which parallelizes internal sort.
Date: Sat, 24 Oct 2009 03:30:34 -0700 (PDT)

Hey all,

    Couldn't sleep, so here's some  benchmarks. Run on gcc14, test files are 
generated by the gensort program (http://www.ordinal.com/gensort.html). 
./current is my implementation, ./sortgl is the version glen lenker submitted. 
rand01, rand03, and rand03 are the files generated by the command gensort 
nlines filename.

1 million lines (96M)

address@hidden:~/testing$ for i in {1 2 3 4}; do env time --format '%e %U %S' 
./current --threads=8 --buffer-size=2G rand01 > /dev/null; done
1.27 4.56 0.19
1.76 4.50 0.25
1.41 5.04 0.20
1.41 4.67 0.24
address@hidden:~/testing$ for i in {1 2 3 4}; do env time --format '%e %U %S' 
./sortgl --threads=8 --buffer-size=2G rand01 > /dev/null; done
1.54 4.41 0.17
1.60 4.37 0.16
1.64 4.40 0.16
1.54 4.45 0.14

3 million lines (287M)
address@hidden:~/testing$ for i in {1 2 3 4}; do env time --format '%e %U %S' 
./current --threads=8 --buffer-size=2G rand03 > /dev/null; done
4.54 17.64 0.49
3.93 17.05 0.48
4.78 16.53 0.52
3.93 17.19 0.46
address@hidden:~/testing$ for i in {1 2 3 4}; do env time --format '%e %U %S' 
./sortgl --threads=8 --buffer-size=2G rand03 > /dev/null; done
5.16 15.58 0.41
5.07 15.52 0.40
4.82 15.66 0.40
5.21 15.72 0.42

5 million lines (477M)
address@hidden:~/testing$ for i in {1 2 3 4}; do env time --format '%e %U %S' 
./current --threads=8 --buffer-size=2G rand05 > /dev/null; done
7.34 37.57 0.88
7.37 29.63 0.79
7.71 39.11 0.86
6.96 32.06 0.90
address@hidden:~/testing$ for i in {1 2 3 4}; do env time --format '%e %U %S' 
./sortgl --threads=8 --buffer-size=2G rand05 > /dev/null; done
8.67 28.55 0.74
8.71 28.15 0.66
9.09 28.33 0.61
8.77 28.30 0.68





reply via email to

[Prev in Thread] Current Thread [Next in Thread]