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

Function bench_arc4

extra/yassl/taocrypt/benchmark/benchmark.cpp:184–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182
183
184void bench_arc4()
185{
186 ARC4 enc;
187 enc.SetKey(key, 16);
188
189 double start = current_time();
190
191 for(int i = 0; i < megs; i++)
192 enc.Process(cipher, plain, sizeof(plain));
193
194 double total = current_time() - start;
195
196 double persec = 1 / total * megs;
197
198 printf("ARC4 %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
199 persec);
200}
201
202
203void bench_md5()

Callers 1

mainFunction · 0.85

Calls 3

current_timeFunction · 0.85
SetKeyMethod · 0.45
ProcessMethod · 0.45

Tested by

no test coverage detected