RE: [HEADS-UP] BSD sort is the default sort in -CURRENT

看板FB_current作者時間13年前 (2012/07/01 08:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串8/8 (看更多)
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,=20 each field is either a floating point number or a binary string with ran= dom=20 symbols between 0 and 255).=20 Sorted on second field (-k 2,2 option): =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D 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 =3D 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 =3D 0.257616) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 =3D 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 =3D 0.0641428) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 performanc= e=20 difference is huge (in favor of NBSD) and it would make no sense. Thanks Oleg > -----Original Message----- > From: owner-freebsd-current@freebsd.org [mailto:owner-freebsd- > current@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 >=20 > Hi >=20 > As promised, I am supplying an example of comparison between several > sort programs. >=20 > The test file is a randomly generated 1,000,000 lines, each line > contain a single floating point number. >=20 > 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 >=20 > The system is a 3-CPUs system, 1.5Gb of RAM, FreeBSD version 8.2. All > times are in seconds. Locale C. >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > TEXT SORT >=20 > 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 >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > NUMERIC SORT -n >=20 > 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 >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > NUMERIC SORT -g >=20 > 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 >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > Thanks > Oleg >=20 >=20 >=20 >=20 >=20 > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current- > unsubscribe@freebsd.org" _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1FxvC-uN (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1FxvC-uN (FB_current)