MCPcopy Create free account
hub / github.com/catboost/catboost / BenchEncode

Function BenchEncode

library/cpp/string_utils/base64/bench/main.cpp:95–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93
94template <typename T>
95static inline void BenchEncode(T& d, const NBench::NCpu::TParams& iface) {
96 for (const auto it : xrange(iface.Iterations())) {
97 Y_UNUSED(it);
98 for (size_t i = 0; i < d.Size; ++i) {
99 NBench::Escape(d.PlaceToEncode[i].data());
100 Y_DO_NOT_OPTIMIZE_AWAY(
101 Base64Encode(d.PlaceToEncode[i].data(), (const unsigned char*)d.Data[i].data(), d.Data[i].size()));
102 NBench::Clobber();
103 }
104 }
105}
106
107template <typename T>
108static inline void BenchEncodeUrl(T& d, const NBench::NCpu::TParams& iface) {

Callers 1

Y_CPU_BENCHMARKFunction · 0.85

Calls 8

xrangeFunction · 0.85
Y_UNUSEDFunction · 0.85
ClobberFunction · 0.85
EscapeFunction · 0.50
Base64EncodeFunction · 0.50
IterationsMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected