mirror of
https://github.com/tezc/sc.git
synced 2025-01-28 07:03:06 +08:00
22 lines
354 B
C
22 lines
354 B
C
|
#include "sc_perf.h"
|
||
|
#include <time.h>
|
||
|
|
||
|
int main(int argc, char *argv[])
|
||
|
{
|
||
|
size_t total = 0;
|
||
|
|
||
|
sc_perf_start();
|
||
|
for (int i = 0; i < 100000000; i++) {
|
||
|
total += (rand() % 331) ^ 33;
|
||
|
}
|
||
|
sc_perf_pause();
|
||
|
|
||
|
for (int i = 0; i < 100000000; i++) {
|
||
|
total += (rand() % 327) ^ 37;
|
||
|
}
|
||
|
|
||
|
sc_perf_end();
|
||
|
|
||
|
return total;
|
||
|
}
|