diff --git a/tests/runner.py b/tests/runner.py index d78487697..4b433b133 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -3050,20 +3050,22 @@ else: #include #include int main() { - int N = 4*1024*1024; + int N = 1024*1024; + int M = 600; int final = 0; char *buf = (char*)malloc(N); - for (int t = 0; t < 20; t++) { + for (int t = 0; t < M; t++) { for (int i = 0; i < N; i++) - buf[i] = (i*i + final)%256; + buf[i] = (i + final)%256; for (int i = 0; i < N; i++) final += buf[i] & 1; + final = final % 1000; } printf("final: %d.\\n", final); return 1; } ''' - self.do_benchmark(src, [], 'final: 41943040.') + self.do_benchmark(src, [], 'final: 800.') def test_fannkuch(self): src = open(path_from_root('tests', 'fannkuch.cpp'), 'r').read()