@@ -237,29 +237,6 @@ struct StringMove {
237
237
static std::string name () { return " BM_StringMove" + Length::name (); }
238
238
};
239
239
240
- template <class Length , class Opaque >
241
- struct StringResizeDefaultInit {
242
- static void run (benchmark::State& state) {
243
- constexpr bool opaque = Opaque{} == Opacity::Opaque;
244
- constexpr int kNumStrings = 4 << 10 ;
245
- size_t length = makeString (Length ()).size ();
246
- std::string strings[kNumStrings ];
247
- while (state.KeepRunningBatch (kNumStrings )) {
248
- state.PauseTiming ();
249
- for (int i = 0 ; i < kNumStrings ; ++i) {
250
- std::string ().swap (strings[i]);
251
- }
252
- benchmark::DoNotOptimize (strings);
253
- state.ResumeTiming ();
254
- for (int i = 0 ; i < kNumStrings ; ++i) {
255
- strings[i].__resize_default_init (maybeOpaque (length, opaque));
256
- }
257
- }
258
- }
259
-
260
- static std::string name () { return " BM_StringResizeDefaultInit" + Length::name () + Opaque::name (); }
261
- };
262
-
263
240
template <class Length , class Opaque >
264
241
struct StringAssignStr {
265
242
static void run (benchmark::State& state) {
@@ -577,7 +554,6 @@ int main(int argc, char** argv) {
577
554
makeCartesianProductBenchmark<StringCopy, AllLengths>();
578
555
makeCartesianProductBenchmark<StringMove, AllLengths>();
579
556
makeCartesianProductBenchmark<StringDestroy, AllLengths>();
580
- makeCartesianProductBenchmark<StringResizeDefaultInit, AllLengths, AllOpacity>();
581
557
makeCartesianProductBenchmark<StringEraseToEnd, AllLengths, AllOpacity>();
582
558
makeCartesianProductBenchmark<StringEraseWithMove, AllLengths, AllOpacity>();
583
559
makeCartesianProductBenchmark<StringRelational, AllRelations, AllLengths, AllLengths, AllDiffTypes>();
0 commit comments