[Mono-dev] [PATCH] Boost speed of UnicodeEncoding
Kornél Pál
kornelpal at hotmail.com
Thu Mar 16 19:39:32 EST 2006
Hi,
>> I think converting a single character should not be optimized as doing
>> so is
>> already inefficient. It's much faster to use convert it inline using
>> shift
>> operators.
> But you already do this test here
>
> + if (byteCount >= 2)
>
> + {
>
> just write else section with fast path for 0 and 1 byte count here.
The attached patch contains some fast paths. I think this is optimal. Note
that currently I'm not going to modify string.memcpy altough it could be
optimized because byte-swapped copy is currently faster for short strings
than string.memcpy.
Kornél
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnicodeEncoding.diff
Type: application/octet-stream
Size: 11152 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060317/92273a60/attachment.obj
More information about the Mono-devel-list
mailing list