dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Could someone test this on all platforms ?


From: Ian Game
Subject: Re: [DotGNU]Could someone test this on all platforms ?
Date: Thu, 06 Feb 2003 19:05:35 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826

Gopal V wrote:

In all the frameworks/platforms you've got ... I'm getting some very strange
results here . very very strange results... Please confirm.

It's a silly benchmark, but I was shocked at the results !!. Please run
at least 3 times and report back ?

Apparently this is a bad case for a JIT ?. (if so, why ?).

Gopal
------------------------------------------------------------------------


using System;
public class FooBar
{
        public static void Test(bool foobar)
        {
                int x;
                if(foobar)
                {
                        x=1;
                }
                else
                {
                        x=0;
                }
        }
}
public class Kicker
{
        public static void Main()
        {
                DateTime t1=DateTime.Now;
                for(int i=0;i<1024;i++)
                {
                        FooBar.Test((i%2)==0);
                }
                DateTime t2=DateTime.Now;
                Console.WriteLine((t2.Millisecond - t1.Millisecond)+" 
Milliseconds");
        }
}

Well, FWIW, under cygwin on a 700MHz box I get 35, 3, 3mS. Is this what you mean Gopal?

I cvs'd all the code a few hours back BTW and re-build as per Rhys helpful instructions ;-)

Ian






reply via email to

[Prev in Thread] Current Thread [Next in Thread]