Sha256: b65f0ee4d54943306a44fea7b0f6bfaec5fdca2a9f10ef245b7653481c14c237

Contents?: true

Size: 368 Bytes

Versions: 1

Compression:

Stored size: 368 Bytes

Contents

#include "benchmark/benchmark.h"

void BM_StringCreation(benchmark::State& state) {
    while (state.KeepRunning())
        std::string empty_string;
}

BENCHMARK(BM_StringCreation);

void BM_StringCopy(benchmark::State& state) {
    std::string x = "hello";
    while (state.KeepRunning())
        std::string copy(x);
}

BENCHMARK(BM_StringCopy);

BENCHMARK_MAIN();

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simdjson-0.3.0 vendor/simdjson/dependencies/benchmark/conan/test_package/test_package.cpp