MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / bench_sha

Function bench_sha

extra/yassl/taocrypt/benchmark/benchmark.cpp:225–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223
224
225void bench_sha()
226{
227 SHA hash;
228 byte digest[SHA::DIGEST_SIZE];
229
230 double start = current_time();
231
232
233 for(int i = 0; i < megs; i++)
234 hash.Update(plain, sizeof(plain));
235
236 hash.Final(digest);
237
238 /*
239 for(int i = 0; i < megs; i++)
240 hash.AsmTransform(plain, 16384);
241 */
242
243
244 double total = current_time() - start;
245
246 double persec = 1 / total * megs;
247
248 printf("SHA %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
249 persec);
250}
251
252
253void bench_ripemd()

Callers 1

mainFunction · 0.85

Calls 3

current_timeFunction · 0.85
UpdateMethod · 0.45
FinalMethod · 0.45

Tested by

no test coverage detected