chore: increase traversal rounds

Co-authored-by: blueloveTH <28104173+blueloveTH@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-01-04 05:01:42 +00:00
parent 7c7675b9d6
commit 7c5a033a86
2 changed files with 4 additions and 4 deletions

Binary file not shown.

View File

@ -15,7 +15,7 @@ static uint64_t bench_int(void) {
volatile long long total = 0;
uint64_t start = nanos();
for (int round = 0; round < 1000; ++round) {
for (int round = 0; round < 100000; ++round) {
long long sum = 0;
for (int i = 0; i < 1000; ++i) sum += arr[i];
total += sum;
@ -23,7 +23,7 @@ static uint64_t bench_int(void) {
uint64_t end = nanos();
// prevent optimization
if (total == 0) printf("unused: %lld\n", total);
return (end - start) / 1000;
return (end - start) / 100000;
}
static uint64_t bench_char(void) {
@ -32,14 +32,14 @@ static uint64_t bench_char(void) {
volatile long long total = 0;
uint64_t start = nanos();
for (int round = 0; round < 1000; ++round) {
for (int round = 0; round < 100000; ++round) {
long long sum = 0;
for (int i = 0; i < 1000; ++i) sum += arr[i];
total += sum;
}
uint64_t end = nanos();
if (total == 0) printf("unused: %lld\n", total);
return (end - start) / 1000;
return (end - start) / 100000;
}
int main(void) {