FreeBSD 6.1 6.2 C++ stl set.clear() very slow
Tom Evans
tevans.uk at googlemail.com
Fri May 4 16:25:50 UTC 2007
On Fri, 2007-05-04 at 19:58 +0400, valiy wrote:
> Tom Evans wrote:
> > On Fri, 2007-05-04 at 18:03 +0400, valiy wrote:
> > <SNIP>
> >
> >> TEST1
> >> FreeBSD idx 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #1: Wed Nov 8
> >> 18:59:20 UTC 2006 root at idx:/usr/src/sys/amd64/compile/SMP amd64
> >>
> >>
> >> 19:07:15 root at idx3 ~ $ g++ ./test_set.cpp
> >> 19:07:23 root at idx3 ~ $ ./a.out
> >> filling
> >> clearing
> >> done
> >> alloc time 1.938 clear time 15.290
> >>
> > <SNIP>
> >
> >> TEST2
> >> FreeBSD proton 5.5-RELEASE FreeBSD 5.5-RELEASE #0: Mon Jun 26 21:47:56
> >> MSD 2006 root at proton:/usr/src/sys/i386/compile/PROTON i386
> >> [root at proton ~]# g++ test_set.cpp
> >> [root at proton ~]# ./a.out
> >> filling
> >> clearing
> >> done
> >> alloc time 2.529 clear time 5.685
> >>
> >>
> > <SNIP>
> >
> >> TEST3:
> >> FreeBSD hotdog 4.9-RELEASE FreeBSD 4.9-RELEASE #3: Fri Jul 1 19:35:10
> >> MSD 2005 root at hotdog:/usr/src/sys/compile/HOTDOG i386
> >>
> >> 19:18 root at puma vvolodin $ ./a.out
> >> filling
> >> clearing
> >> done
> >> alloc time 4.001 clear time 0.305
> >>
> >> pentium3 2x700MHz
> >>
> >> how to fix?
> >>
> >>
> >
> > (Couldnt see your 6.2 result, did I snip it?)
> >
> > Upgrade to 6.2, or for better results, 7-CURRENT
> > $ uname -a && ./stl_test
> > FreeBSD zoot.mintel.co.uk 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Wed Mar 28
> > 12:29:25 BST 2007 root at zoot.mintel.co.uk:/usr/obj/usr/src/sys/ZOOT
> > i386
> > filling
> > clearing
> > done
> > alloc time 2.252 clear time 0.441
> > (CURRENT with no INVARIANTS nor WITNESS, and MALLOC_PRODUCTION defined)
> >
> >
> > $ uname -a && ./stl_test
> > FreeBSD bob.mintel.co.uk 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Thu Jan 18
> > 14:18:05 GMT 2007 root at bob.mintel.co.uk:/usr/obj/usr/src/sys/BOB
> > i386
> > filling
> > clearing
> > done
> > alloc time 2.705 clear time 5.691
> >
> > Is your test for 4 using GCC 2.95 ? C++ in GCC 2.95 is «interesting» in
> > the shortcuts it takes.
> >
> We didn't include 6.2 report in mail, but we experience same probles.
> results are exactly as yours above (alloc time 2.7 clear time 5.6)
>
> BSD 4 test was using compiler 2.95
>
> Is there any way to fix it without upgrading to 7.0?
Not sure, I'd be interested in this as well, we do LOTS of computation
using STL containers (and run 6.2 everywhere). I was advised that bob
[the 6.2 box I tested on] 'was a bit s***', so I've also tested on
another box:
> $ uname -a && ./stl_test
FreeBSD roley.mintel.co.uk 6.2-RELEASE FreeBSD 6.2-RELEASE #1: Wed Jan
17 10:37:46 GMT 2007
root at roley.mintel.co.uk:/usr/obj/usr/src/sys/ROLEY amd64
filling
clearing
done
alloc time 1.968 clear time 12.420
Seems that amd64 is even worse in this situation than i386. Very
curious.
I didn't mention it before, but all of my tests are done using GCC 3.4.6
Cheers
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20070504/6f457f28/attachment.pgp
More information about the freebsd-hackers
mailing list