Hello all,
just a quick question - apparently QVarLengthArray is faster assigining memory. But is
QVector<> (with any assignable basic type) slower in a loop e.g. using ...
Qt Code:
QVector<short> vector (1024); for(int i=0; i<vector.size();++i){ someShort = vector.at(i); or vector[i] = i; }To copy to clipboard, switch view to plain text mode
or should I make a short* from vector.data() and put the pointer into the loop?
By the way, does the vector.size() get calculated every iteration?
thanks
K


Reply With Quote



Bookmarks