2020-11-11 01:19:49 +03:00
|
|
|
#include "sc_perf.h"
|
2021-04-07 00:28:50 +03:00
|
|
|
|
2021-02-05 16:35:10 +03:00
|
|
|
#include <stdlib.h>
|
2020-11-11 01:19:49 +03:00
|
|
|
|
2022-08-20 18:56:21 +03:00
|
|
|
int main(void)
|
2020-11-11 01:19:49 +03:00
|
|
|
{
|
2021-04-07 00:28:50 +03:00
|
|
|
size_t total = 0;
|
2020-11-11 01:19:49 +03:00
|
|
|
|
2021-04-07 00:28:50 +03:00
|
|
|
sc_perf_start();
|
|
|
|
for (int i = 0; i < 100000000; i++) {
|
|
|
|
total += (rand() % 331) ^ 33;
|
|
|
|
}
|
|
|
|
sc_perf_pause();
|
2020-11-11 01:19:49 +03:00
|
|
|
|
2021-04-07 00:28:50 +03:00
|
|
|
for (int i = 0; i < 100000000; i++) {
|
|
|
|
total += (rand() % 327) ^ 37;
|
|
|
|
}
|
2020-11-11 01:19:49 +03:00
|
|
|
|
2021-04-07 00:28:50 +03:00
|
|
|
sc_perf_end();
|
2020-11-11 01:19:49 +03:00
|
|
|
|
2021-04-07 00:28:50 +03:00
|
|
|
return total;
|
2020-11-11 01:19:49 +03:00
|
|
|
}
|