aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/benchmark/smart_pointers/main.cpp
blob: 92c2f923bb70c764872dd89d341d4152a61d7424 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <library/cpp/testing/benchmark/bench.h>

#include <util/generic/ptr.h>
#include <util/generic/xrange.h>

struct X: public TAtomicRefCount<X> {
};

Y_CPU_BENCHMARK(SimplePtrConstruct, iface) {
    for (const auto i : xrange(iface.Iterations())) {
        Y_UNUSED(i);
        Y_DO_NOT_OPTIMIZE_AWAY(TSimpleIntrusivePtr<X>());
    }
}