blob: b89e351ba721f7f4a62e4b78cabd61879f181a1e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "f.h"
#include <library/cpp/testing/benchmark/bench.h>
#include <util/generic/vector.h>
#include <util/generic/ptr.h>
void CreateYvector(const size_t size, const size_t count) {
for (size_t i = 0; i < count; ++i) {
NBench::Clobber();
TVector<ui8> v(size);
NBench::Escape(v.data());
NBench::Clobber();
}
}
void CreateCarray(const size_t size, const size_t count) {
for (size_t i = 0; i < count; ++i) {
NBench::Clobber();
TArrayHolder<ui8> v(new ui8[size]);
memset(v.Get(), 0, size * sizeof(ui8));
NBench::Escape(v.Get());
NBench::Clobber();
}
}
|