[Mono-dev] [PATCH] Redirect certain string constructors to CreateString

Zoltan Varga vargaz at gmail.com
Tue Jul 18 09:14:19 EDT 2006


                                    Hi,

  I would vote for option (C) since it seems the most correct. I think
this is ok to check in.
It might not be the fastest, but it fixes a bug, and these string
ctors do not seem to be
very heavily used, so slowing them down is not a very big problem
IMHO. When Paolo's
solution is implemented, this can be changed to use that approach.

                              Zoltan

On 7/18/06, Kornél Pál <kornelpal at gmail.com> wrote:
> Hi,
>
> I attached three different versions of the patch:
> CreateString_marshal_none.diff: use no wrapper (fastest)
> CreateString_marshal_jmp.diff: use managed-to-managed wrapper with CEE_JMP
> (security attributes of .ctor applied)
> CreateString_marshal_call.diff: use managed-to-managed wrapper with CEE_CALL
> (slowest, security attributes of .ctor applied, .ctor in stack trace)
>
> CreateString_corlib.diff: this is required by all the above patches
>
> All of the three versions are faster than the current implementation (note
> that constructors that take no Encoding should use Encoding.Default so they
> are currently faster because they are implemented incorrectly).
>
> Also note that performance will be improved further when an internal
> GetString method will be used for internal Encoding classes that takes a
> byte* instead of byte[].
>
> Andvantages and disadvantages of these versions were explained and discussed
> on the list.
>
> Please review the patch and approve one of the three versions.
>
> Kornél
>
> ----- Original Message -----
> From: "Kornél Pál" <kornelpal at gmail.com>
> To: "Zoltan Varga" <vargaz at gmail.com>
> Cc: <mono-devel-list at lists.ximian.com>
> Sent: Sunday, July 16, 2006 5:01 PM
> Subject: Re: [Mono-dev] [PATCH] Redirect certain string constructors to
> CreateString
>
>
> > Hi,
> >
> > Now I consider the attached patch being complete.
> >
> > Please review and approve the patch.
> >
> > Kornél
> >
> > ----- Original Message -----
> > From: "Zoltan Varga" <vargaz at gmail.com>
> > To: "Kornél Pál" <kornelpal at gmail.com>
> > Cc: <mono-devel-list at lists.ximian.com>
> > Sent: Sunday, July 16, 2006 3:28 PM
> > Subject: Re: [Mono-dev] [PATCH] Redirect certain string constructors to
> > CreateString
> >
> >
> >                   Hi,
> >
> > Just add it to the relevant header file.
> >
> >              Zoltan
> >
>
>
>



More information about the Mono-devel-list mailing list