android_mt6572_jiabo/system/extras/simpleperf/runtest/function_recursive.cpp
2025-09-05 16:56:03 +08:00

16 lines
290 B
C++

constexpr int LOOP_COUNT = 5000000;
void FunctionRecursive(int loop) {
for (volatile int i = 0; i < LOOP_COUNT; ++i) {
}
if (loop > 0) {
FunctionRecursive(loop - 1);
}
for (volatile int i = 0; i < LOOP_COUNT; ++i) {
}
}
int main() {
FunctionRecursive(10);
return 0;
}