Speed up setup for QSet unite benchmark
Pick-to: 6.8 6.7 6.5 Change-Id: I38a56ae2c9f3dcbcb851cf63ae692cd7f9497989 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
0c010cd9c7
commit
ccbf2cd43c
@ -125,10 +125,12 @@ void tst_QSet::unite_int_data()
|
||||
auto build_sets(int lhsSize, int rhsSize, int overlap)
|
||||
{
|
||||
QSet<int> lhs;
|
||||
lhs.reserve(lhsSize);
|
||||
for (int i = 0; i < lhsSize; ++i)
|
||||
lhs.insert(i);
|
||||
|
||||
QSet<int> rhs;
|
||||
rhs.reserve(rhsSize);
|
||||
for (int i = lhsSize - overlap; i < rhsSize + lhsSize - overlap; ++i)
|
||||
rhs.insert(i);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user