This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: implementation & optimization of std::function with and without allocator


On 25 January 2014 23:40, Marc Glisse wrote:
> On Sat, 25 Jan 2014, Jonathan Wakely wrote:
>
>> That isn't similar and the use of std::array is irrelevant.
>> std::function involves type erasure, usually dynamic allocation, and
>> indirection through function pointers. If you don't use std::function
>> then none of that needs to be optimised away.
>
>
> Indeed. But optimizing the code generated when std::function is used seems a
> worthy goal to me.

Yes, I'd love to see it done, I'm just not surprised that it isn't
done currently.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]