This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Fix libstdc++/12439
Nathan Myers wrote:
else
- {
- *__s = __c;
- ++__s;
- }
+ *__s++ = *__tmp;
}
return __s;
}
This last delta is suboptimal. Post-increment is quite expensive on
many iterator types. Code that takes general iterator types should
always use pre-increment. Any use of post-increment where we don't
know the iterator type should be considered a performance bug.
Hi. Ok for this. I'd rather prefer not answering in public the other part...
Paolo.