This is the mail archive of the
mailing list for the libstdc++ project.
Re: Remove algorithms implementation duplications
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Sun, 22 Jul 2012 17:52:09 +0100
- Subject: Re: Remove algorithms implementation duplications
- References: <4FFDCB54.firstname.lastname@example.org>
On 11 July 2012 19:52, François Dumont wrote:
> Note also that this patch in addition to cleaning libstdc++ code will
> also benefit to our users:
> - concept check are no repeated each time an algo call an other algo.
> Now concept checks are done in Standard algo implementations and those
> implementations only use internal functions, the "__XXX" functions, that do
> not redo the checks
That's good, although I'm not sure how many people actually use those
Is there any noticeable difference when not using concept checks,
either to code size, compile time, or performance?
> I also wonder if I shouldn't move all the implementation details in the
> std::__detail namespace ? Should I do it now, before eventually applying the
> patch ?
Yes, I think they are internal details, not GNU extensions or other
non-standard but user-visible components like some of the __gnu_cxx
contents. Also, as Paolo pointed out, all the object generators in
<bits/predefined_ops.h> should be inline.
Overall I like the simplifications it makes to the algos, nice work.