aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/benchmark/smart_pointers/main.cpp
blob: aa04601807e15f160f53d46eb30ebe3f46e62c05 (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>()); 
    } 
}