Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2019-12-02 18:24:44


Zach Laine wrote:
> Ok, I tried this myself on Quickbench:
>
> http://quick-bench.com/WZPNHFBKI-hFxThBYRZVjndtBho

I tried to fix that to add the null terminator, but as a result both
push_backs were entirely optimized away.

http://quick-bench.com/DtPR9Yov1TSzUFeYRx0ipVvUYBk

The Append case is how I think this code should be written. Character by
character loops are only useful as a worst-case estimate; if there's a
performance problem there, you'd rewrite the loop to not push_back
characters one by one, not try to make it go faster.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk