Speed up setup for QSet unite benchmark
Pick-to: 6.7 6.5 Change-Id: I38a56ae2c9f3dcbcb851cf63ae692cd7f9497989 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit ccbf2cd43c1748259410cddbf4f359b6b88df987) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
690cc978ea
commit
28abd01732
@ -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