[HEADS-UP] BSD sort is the default sort in -CURRENT
Oleg Moskalenko
oleg.moskalenko at citrix.com
Sat Jun 30 23:53:41 UTC 2012
I am going to post the ministat results of my tests:
1) Text sort of 167-Mb file (1,000,000 random lines, each contains several fields,
each field is either a floating point number or a binary string with random
symbols between 0 and 255).
Sorted on second field (-k 2,2 option):
====================================================
x OGNU
+ NGNU
* NBSD (multi-threaded)
+--------------------------------------------------+
| x * + |
| x x * +++ |
|xxxxx x * ** * +++* * * *|
| |_A_| |_______M_|AA___________| |
+--------------------------------------------------+
N Min Max Median Avg Stddev
x 10 5.758 5.937 5.848 5.8508 0.057276716
+ 10 6.29 6.366 6.332 6.3302 0.02123833
Difference at 95.0% confidence
0.4794 +/- 0.0405862
8.19375% +/- 0.693687%
(Student's t, pooled s = 0.0431954)
* 10 6.067 7.228 6.225 6.3449 0.35979422
Difference at 95.0% confidence
0.4941 +/- 0.242055
8.445% +/- 4.13713%
(Student's t, pooled s = 0.257616)
==================================================
2) Same file, numeric sort on the same field (-k 2,2 -n option):
x OGNU.n
+ NGNU.n
* NBSD.n (multi-threaded)
+--------------------------------------------------+
|**** * x x x +++|
|**** * xx x x ++++|
| |MA_| |__A_| |A |
+--------------------------------------------------+
N Min Max Median Avg Stddev
x 10 7.142 7.338 7.216 7.2179 0.066727389
+ 10 8.231 8.307 8.271 8.2677 0.022701199
Difference at 95.0% confidence
1.0498 +/- 0.0468287
14.5444% +/- 0.648785%
(Student's t, pooled s = 0.0498392)
* 10 6.91 7.094 6.98 6.9864 0.061449528
Difference at 95.0% confidence
-0.2315 +/- 0.0602683
-3.2073% +/- 0.834983%
(Student's t, pooled s = 0.0641428)
=============================================================
On these two tests, all three program produced the same output.
So, on text sort, NBSD is slightly slower than GNU; on simple numeric
sort, NBSD is slightly faster.
I did not use ministat for complex numeric sort (-g) because the performance
difference is huge (in favor of NBSD) and it would make no sense.
Thanks
Oleg
> -----Original Message-----
> From: owner-freebsd-current at freebsd.org [mailto:owner-freebsd-
> current at freebsd.org] On Behalf Of Oleg Moskalenko
> Sent: Wednesday, June 27, 2012 6:45 PM
> To: FreeBSD Current
> Subject: RE: [HEADS-UP] BSD sort is the default sort in -CURRENT
>
> Hi
>
> As promised, I am supplying an example of comparison between several
> sort programs.
>
> The test file is a randomly generated 1,000,000 lines, each line
> contain a single floating point number.
>
> We are going to sort it three ways - as text, as -n numeric sort, and
> as -g numeric sort, with 4 programs:
> 1) Old BSD/GNU sort 5.3.0
> 2) New GNU sort 8.15
> 3) New BSD sort, single threaded
> 4) New BSD sort, multi-threaded
>
> The system is a 3-CPUs system, 1.5Gb of RAM, FreeBSD version 8.2. All
> times are in seconds. Locale C.
>
> ==============================================
>
> TEXT SORT
>
> sys user real
> Old BSD/GNU sort: 0.0 1.692 2.008
> New GNU sort: 0.0 2.279 1.605
> New BSD sort, st: 0.0 1.964 2.300
> New BSD sort, mt: 0.0 2.385 1.897
>
> ==============================================
>
> NUMERIC SORT -n
>
> sys user real
> Old BSD/GNU sort: 0.0 4.357 4.674
> New GNU sort: 0.0 8.839 5.134
> New BSD sort, st: 0.0 5.308 5.592
> New BSD sort, mt: 0.0 4.581 2.489
>
> ==============================================
>
> NUMERIC SORT -g
>
> sys user real
> Old BSD/GNU sort: 0.0 45.378 45.630
> New GNU sort: ~450 ~121 ~300
> New BSD sort, st: 0.33 4.334 5.992
> New BSD sort, mt: 11.140 4.624 8.983
>
> ===============================================
>
> Thanks
> Oleg
>
>
>
>
>
> _______________________________________________
> freebsd-current at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-
> unsubscribe at freebsd.org"
More information about the freebsd-current
mailing list