Welcome to mirror list, hosted at ThFree Co, Russian Federation.

inline5.cs « benchmark « mono - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4e8e45b9bed0e26cd047ce01ffc5dcdbbfceea27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;

public class Test {

	static int a = 0;
	
	public static void test (int n) {
		a+=n;
	}

	public static int Main (string[] args) {
		int repeat = 1;
		
		if (args.Length == 1)
			repeat = Convert.ToInt32 (args [0]);
		
		Console.WriteLine ("Repeat = " + repeat);

		for (int i = 0; i < repeat; i++)
			for (int j = 0; j < 500000000; j++)
				test (a);
		
		return 0;
	}
}