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

Function BMTryFromString

tools/enum_parser/parse_enum/benchmark/main.cpp:65–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63
64 template <class TEnum, class TContext>
65 void BMTryFromString(TContext& iface) {
66 auto strings = SelectStrings<TEnum>(5u);
67 strings.back() = "fake";
68
69 TEnum value;
70 for (const auto iter : xrange(iface.Iterations())) {
71 Y_UNUSED(iter);
72 for (const auto s : strings) {
73 Y_DO_NOT_OPTIMIZE_AWAY(TryFromString<TEnum>(s, value));
74 }
75 }
76 }
77}
78
79#define DEFINE_BENCHMARK(name) \

Callers

nothing calls this directly

Calls 4

xrangeFunction · 0.85
Y_UNUSEDFunction · 0.85
backMethod · 0.45
IterationsMethod · 0.45

Tested by

no test coverage detected