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: Paolo Molaro
Subject: Re: [DotGNU]Could someone test this on all platforms ?
Date: Fri, 7 Feb 2003 15:50:44 +0100
User-agent: Mutt/1.4i

On 02/07/03 Gopal V wrote:
> > 1) the first DateTime.Now call will make the jit compile lots of methods
> > (initialization of some types and so on). 
> 
> Hmm...This also applies for ilrun (CVM conversion, unrolling, inlining) ?.

Since the code in corlib is different for mono and ilrun, it's not the
same thing (DateTime in mono has a TimeSpan field, so when the first Now
property is called a DateTime is created from a int64 value representing
the current time, after that a TimeSpan is created and that has
dependencies on Hashtable and so on, resulting in the compilation of 60
or so methods).

> > 2) the Millisecond property has, well, a millisecond resolution:-)
> 
> Well that's obtained after the two DateTime.Now calls.. So that should
> not interfere .

No, see above, the current time may be queried before compiling all the
related methods.

> > I just added a "t1=DateTime.Now;" before the loop and increased the
> > number of iterations to 10240000. Results are below:
> 
> Hmm.. I was comparing the performance of x86 unrolled ilrun doing the
> FooBar.Test() and full JIT doing FooBar.Test() .. When I got a higher
> speed for the simpler ilrun , I added 1024 runs to balance out any
> effects of conversion.

But 1024 is still too little: you're trying to measure the size of an
egg with a feet and, after crashing the egg, all you can say is that it
was somewhere from 0 to 2 feet big ;-)

> > about two times slower than mono in your test.
> 
> hehe, after you doctored it to give that :) ....

No, the doctored version had the the loop variable i as a uint instead
of an int and that makes the program run 4 times faster than ilrun with
the new mono jit:-) But I guess I should have kept such tricks for
publishing benchmarks in a conference paper... :-)

BTW, I used an old ilrun for the previous results, after updating from
cvs, it takes 2.5 seconds instead of .8. Maybe it didn't enable the
unroller this time around or there may be other problems you may want to
check. Your version of the program still gives a 1 Millisec result, so
you may not be able to see the effect of that (again, measuring
something with the proper resolution... :-).

lupus

-- 
-----------------------------------------------------------------
address@hidden                                     debian/rules
address@hidden                             Monkeys do it better


reply via email to

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