mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-14 22:38:46 +00:00
Update benchmarks
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
int two_dimension_array_arr[100];
|
||||
|
||||
int two_dimension_array(int n, int nonce) {
|
||||
if (!(n <= 100)) {
|
||||
return nonce;
|
||||
}
|
||||
|
||||
for (int i = 0; i < n; ++i) {
|
||||
two_dimension_array_arr[i] = i + nonce;
|
||||
}
|
||||
|
||||
for (int i = 0; i < n; ++i) {
|
||||
for (int j = 0; j < n; ++j) {
|
||||
two_dimension_array_arr[i] += two_dimension_array_arr[j];
|
||||
if (!(n <= 100)) {
|
||||
return nonce;
|
||||
}
|
||||
}
|
||||
|
||||
int result = 0;
|
||||
for (int i = 0; i < n; ++i) {
|
||||
result += two_dimension_array_arr[i];
|
||||
}
|
||||
for (int i = 0; i < n; ++i) {
|
||||
two_dimension_array_arr[i] = i + nonce;
|
||||
}
|
||||
|
||||
return result;
|
||||
for (int i = 0; i < n; ++i) {
|
||||
for (int j = 0; j < n; ++j) {
|
||||
two_dimension_array_arr[i] ^= two_dimension_array_arr[j];
|
||||
}
|
||||
}
|
||||
|
||||
int result = 0;
|
||||
for (int i = 0; i < n; ++i) {
|
||||
result += two_dimension_array_arr[i];
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user