mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 08:34:39 +08:00
Add reserve in p_bench.cc
This commit is contained in:
@@ -118,6 +118,7 @@ void renumber(const std::vector< uint64_t > & vertex_ids,
|
||||
threadpool pool((supports_parallel_insertion) ? num_threads : 1);
|
||||
|
||||
stopwatch.start();
|
||||
new_ids.reserve(vertex_ids.size() * 110 / 100);
|
||||
pool.parallel_for(vertex_ids.size(), [&](uint64_t i){
|
||||
auto id = new_id++;
|
||||
new_ids[vertex_ids[i]] = id;
|
||||
|
||||
Reference in New Issue
Block a user