Skip to content

Commit 9b1da04

Browse files
committed
reserve before emplace loop
Signed-off-by: Yuchen Liang <[email protected]>
1 parent db2bcb7 commit 9b1da04

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/primer/skiplist_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ TEST(SkipListTest, ConcurrentReadTest) {
335335
// Number of threads to use for concurrent reads
336336
const int num_threads = 8;
337337
std::vector<std::thread> threads;
338+
threads.reserve(num_threads);
338339

339340
const int total_num_elements = num_threads * 8192;
340341
auto list = std::make_unique<SkipList<int>>();

0 commit comments

Comments
 (0)