This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/13823] Significant performance issue with std::map on multiple threads on dual processor - possibly default allocator
- From: "rittle at latour dot rsch dot comm dot mot dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jan 2004 04:14:10 -0000
- Subject: [Bug libstdc++/13823] Significant performance issue with std::map on multiple threads on dual processor - possibly default allocator
- References: <20040123001452.13823.devison@pacificit.co.nz>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rittle at latour dot rsch dot comm dot mot dot com 2004-01-23 04:14 -------
Subject: Re: Significant performance issue with std::map on
multiple threads on dual processor - possibly default allocator
> I'm no expert here, but perhaps it would still be best to have an outer loop
> in the calc function - say 5 or 10 iterations. That may exercise the
> allocator a bit more, repeatedly allocating and deallocating from the pool.
OK, added to performance test case I'm adding to libstdc++-v3.
> As an aside - I didn't know an array could have a variable as its size.
> Stroustrup's C++PLv3 says "The number of elements of the array, the array
> bound, must be a constant expression". But I see it compiles and works with
> gcc!
OK, you got me. Add -pedantic to see g++ fail the test case, as I
updated it. This is a long-standing gcc extension.
> (btw I was aware of the misuse :)
OK, no problem. Just an FYI to those that follow the thread later.
Thanks for the PR,
Loren
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13823