Op 27-7-2015 om 21:42 schreef Gunnar Roth: > Hi Constantin. > Thank you for looking at my benchmark. > >> Am 24.07.2015 um 08:57 schrieb Constantin Makshin <cmaks...@gmail.com>: >> >> Well, after looking at the code I can say that the was you wrote this >> benchmark "abuses" the QVector's copy-on-write semantic, making it >> somewhat biased towards std::vector — you use only non-const versions of >> QVector::begin(), QVector::end() and indexing methods. That leads to a >> lot of [obviously non-free] checks for sharing and possible detachment. >> > Actually imo this is the most important case. Why should i iterate over a > vector and not change the values? > If i search in a vector it should be sorted. Not always true of course. You can only sort on one key. What if once in awhile I need to search on another key? If usually my Employee objects are in a vector sorted by id, I may still want to search by name once in awhile. Of course, if you need to search frequently on a key, sort by it.
André _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest