Hi all,
I am trying to use the sparse_hash_map with int as keys and double as values, but it is really slow.
It takes about 34 secs to store an image (only the non-zero values) vs 2 secs when using unordered_map.
I'm using the following code:
sparse_hash_map<int, double> himg;
himg.set_deleted_key(-1);
for (int idx = 0; idx < numvoxels; ++idx) {
val=image->Get(idx);
if(val){
himg[idx]=val;
}
}
What could be causing this performance?
Thank you!
Antonis