[Mono-list] Some benchmarks

Paolo Molaro lupus@ximian.com
Mon, 9 Aug 2004 17:55:03 +0200


On 08/07/04 Pedro Santos wrote:
> I have an aplication with many, many objects in memory that I have to
> save/load to have persistence. I implemented an abstract framework that
> enables me to make several persistence implementations. At this point, I
> have implemented persistence in XML (I write, I read to DOM and parse --
> can't use XmlSerializer cause I have some Hastables... :( ), and

I think you may be able to set an attribute and serialize hashtables on
your own. Google should have more details.

> 1) Is writing to a file very much slower than reading from a file in
> Windows? Does the oposite happens in Linux?

Writing is usually slower than reading, but this is not likely the cause
of the behaviour you're seeing.

> 2) Any information on can add on this results? Are they "expected"
> results?

[...]
> Running on Linux, Mono JIT compiler version 0.95, I got this:

Mono 1.0 was released more than a month ago, please use that.

>  --- XmlPersistenceTester ---
> Alliances: 2 Rulers: 1011 Planets: 1011
> Save time: 00:01:07.6105670
> Load time: 00:02:47.9479530
> 
> --- BinaryPersistenceTester ---
> Alliances: 2 Rulers: 1011 Planets: 1011
> Save time: 00:01:20.1833240
> Load time: 00:03:13.55315

The results look interesting, especially if they were run on the same
machine as the MS .net ones:-)
There is probably some method or algorithm involved in the load path
that needs to be optimized in mono. You could use a smaller data set
(to reduce test time) and run the load test with:
	mono --profile test-load.exe ...

The profile should give you some hints about where it's spending the
time. You might want to post the relevant info to the list, so whatever
in mono is causing the slowdown on load can be fixed.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better