This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] mt_allocator performance improvements
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Paolo Carlini" <pcarlini at suse dot de>
- Cc: "Benjamin Kosnik" <bkoz at redhat dot com>, libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, david at bozemanpass dot com
- Date: Thu, 16 Mar 2006 18:39:30 +0100
- Subject: Re: [v3] mt_allocator performance improvements
- References: <20060315215545.61a6eed0.bkoz@redhat.com> <44199B32.7060705@suse.de>
On 3/16/06, Paolo Carlini <pcarlini@suse.de> wrote:
> All, Richard,
>
> I suspect today's crazy exchange is ultimately due to this line in the
> performance improvement:
>
> >- --__bin._M_used[__block->_M_thread_id];
> >+ --__thread_bin._M_used;
> >
> >
> which, at the moment, I cannot convince myself is right, i.e., changes
> *only* the details of the implementation of the allocator without
> affecting the algorithm.
The above simply accepts accounting _M_used to the wrong bin, or declares
deallocating from a different thread than allocating invalid (at least
for accounting).
It also avoids the mess that the PR was about ;)
Richard.