vendredi 26 juin 2020

why I search in map stl time difference is a lot?

when I use stl map ,I meet some problems?

method1

cnt += umap[t];

method2

if (umap.find(t) != umap.end())
cnt += umap[t];

why method2 is more faster?

Aucun commentaire:

Enregistrer un commentaire