Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2019-12-05 16:16:21


Phil Endecott wrote:
> Results will depend on the architecture but I found that for N < 64 it was
> probably always best to copy_all(). For N==255, time for copy_all() and
> copy_size() is about equal when the container is half full.
>
> Things are more complicated for operator== because of the unused bytes.
> It would be necessary to initialise everything to 0 and maintain that
> during e.g. erase() and assign(). I haven't tried to benchmark that but I
> suspect the trade-off would be similar.

This is an interesting observation because constexpr support requires the
array to be initialized to 0. So if we can justify this as actually being
faster for N < some value, we might as well do it.


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