When declaring a concurrent_vector, i.e:
if the number of elementes that the vector will contain is known beforehand, using
v.reserve( size );
will improve the performance?
Thanks in advance.
Using reserve() generally seems to be a good idea. For tbb::concurrent_vector, it would appear to improve access time as well as growth time, but I have not analysed or measured this.
Thank you Raf!