MCPcopy Create free account
hub / github.com/apache/impala / TestImpalaNonNullTerminated

Function TestImpalaNonNullTerminated

be/src/benchmarks/string-search-benchmark.cc:100–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void TestImpalaNonNullTerminated(int batch_size, void* d) {
101 TestData* data = reinterpret_cast<TestData*>(d);
102 for (int i = 0; i < batch_size; ++i) {
103 data->matches = 0;
104 for (int n = 0; n < data->needles.size(); ++n) {
105 // Exercise the non null-terminated path.
106 StringSearchSSE needle(&(data->needles[n]));
107 for (int iters = 0; iters < 10; ++iters) {
108 for (int h = 0; h < data->haystacks.size(); ++h) {
109 if (needle.Search(data->haystacks[h]) != -1) {
110 ++data->matches;
111 }
112 }
113 }
114 }
115 }
116}
117
118// This should be tailored to represent the data we expect.
119// Some algos are better suited for longer vs shorter needles, finding the string vs.

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
SearchMethod · 0.45

Tested by

no test coverage detected