- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
When declaring a concurrent_vector, i.e:
Thanks in advance.
When declaring a concurrent_vector, i.e:
[bash]tbb::concurrent_vectorif the number of elementes that the vector will contain is known beforehand, usingv;[/bash]
[bash]v.reserve( size );[/bash]will improve the performance?
Thanks in advance.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Raf!

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page