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

Function BenchEncodeUrl

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

Source from the content-addressed store, hash-verified

106
107template <typename T>
108static inline void BenchEncodeUrl(T& d, const NBench::NCpu::TParams& iface) {
109 for (const auto it : xrange(iface.Iterations())) {
110 Y_UNUSED(it);
111 for (size_t i = 0; i < d.Size; ++i) {
112 NBench::Escape(d.PlaceToEncode[i].data());
113 Y_DO_NOT_OPTIMIZE_AWAY(
114 Base64EncodeUrl(d.PlaceToEncode[i].data(), (const unsigned char*)d.Data[i].data(), d.Data[i].size()));
115 NBench::Clobber();
116 }
117 }
118}
119
120template <typename T>
121static inline void BenchDecode(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
Base64EncodeUrlFunction · 0.50
IterationsMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected