hello folks,

my program runs too slow, so i did a profiling test. the result showed that i'm using too many std::vectors.

the profiling tool i'm using is AMD's codeAnalyst , however one weird thing is, the top two functions that have the most time samples are

tan() and strchr() in ntdll.dll

i just don't understand how come these two functions could have something to do with std::vector?

i did a simpler test

the code is easy:

void main(){

for(int i=0;i<4000000;++i)
std::vector<int> a;
};

and once again, the codeAnalyst pointed out the two slowest function

tan() and strchr() in the ntdll.dll

why?