MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / Bech32Encode

Function Bech32Encode

src/bench/bech32.cpp:15–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14
15static void Bech32Encode(benchmark::State& state)
16{
17 std::vector<uint8_t> v = ParseHex("c97f5a67ec381b760aeaf67573bc164845ff39a3bb26a1cee401ac67243b48db");
18 std::vector<unsigned char> tmp = {0};
19 tmp.reserve(1 + 32 * 8 / 5);
20 ConvertBits<8, 5, true>([&](unsigned char c) { tmp.push_back(c); }, v.begin(), v.end());
21 while (state.KeepRunning()) {
22 bech32::Encode("btg", tmp);
23 }
24}
25
26
27static void Bech32Decode(benchmark::State& state)

Callers

nothing calls this directly

Calls 7

ParseHexFunction · 0.85
EncodeFunction · 0.85
KeepRunningMethod · 0.80
reserveMethod · 0.45
push_backMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected