MCPcopy Create free account
hub / github.com/bytedance/bolt / runFlat

Method runFlat

bolt/benchmarks/basic/DecodedVector.cpp:67–76  ·  view source on GitHub ↗

Runs a fast path over a flat vector (no decoding).

Source from the content-addressed store, hash-verified

65
66 // Runs a fast path over a flat vector (no decoding).
67 size_t runFlat() {
68 const int64_t* flatBuffer = flatVector_->values()->as<int64_t>();
69 size_t sum = 0;
70
71 for (auto i = 0; i < vectorSize_; i++) {
72 sum += flatBuffer[i];
73 }
74 folly::doNotOptimizeAway(sum);
75 return vectorSize_;
76 }
77
78 // Runs over a decoded flat vector.
79 size_t decodedRunFlat() {

Callers 1

BENCHMARKFunction · 0.80

Calls 1

valuesMethod · 0.45

Tested by

no test coverage detected