[Mono-list] mcs compiles on linux. Now what?
08 Mar 2002 13:10:56 +0100
Paolo Molaro <firstname.lastname@example.org> writes:
> 21 % is spent in Array.Copy. One third of this time is spent in the
> IsValueType checks. Here we can use the fast copy method even for
> objects, not only for valuetypes, so that check should not be there, I
> think: we could have a new icall the do the check or we could integrate
> the chek in FastCopy (but making it return an error code that is checked
> and throws an exception or falls back to the slow implementation in C#
So, maybe it was a bad idea to do all the Array.Copy checks in C# -
especially if IsValueType shows up in the profile at all ?
In my do-everything-in-an-icall implementation, the IsValueType was a
simple integer comparision in C, for instance.
I'd also suggest doing the "slow implementation" in the interncall -
especially if you run mcs in the interpreter, a C# function call does
matter - and the current implementation does 2 * length of the array
> 20 % of the time is spent in the various StringBuilder.Append (this may
> explain some of the parsing slowness, I think): we need to speed up that
I can look at this and String.IndexOf next week.