All pastes #381736 Raw Edit

Something

public text v1 · immutable
#381736 ·published 2007-03-05 01:18 UTC
rendered paste body
using System;

namespace test
{
public class testt
{
public static void Main(string[] args)
{
    int a= 5;
    int b=6;
    int value;

while(true)
{
a = 5;
b = 7;
    DateTime start = DateTime.Now;

    for(int i=0; i < 100000000; i++)
    {
        if(a > b)
           a = -a;
        else
          a = b;
    }

    Console.WriteLine("First: " + (DateTime.Now - start).TotalMilliseconds);


    start = DateTime.Now;
    for(int i=0; i < 100000000; i++)
    {
        a = (a > b) ? -a : b;
    }

    Console.WriteLine("Second: " + (DateTime.Now - start).TotalMilliseconds);
}}
}
}