[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: Handling overlapping buffers in wcstombs_sbcs
From: Alexandre Julliard <julliard () winehq ! com>
Date: 2001-03-23 17:59:44
[Download RAW message or body]
François Gouget <fgouget@codeweavers.com> writes:
> Actually the documentation specifies that WideCharToMultiByte (called
> by ConvertVersionInfo32To16) fails if the source and destination
> pointers are the same. But it does not specify what happens if the
> buffers merelyt overlap. And of course in the ConvertVersionInfo32To16
> case there's a 2 byte difference between them!
Then ConvertVersionInfo32To16 is broken; WideCharToMultiByte does not
support overlapping buffers.
> I'm not really convinced by the loop unrolling but I tried to keep it
> anyway. I just modified it a bit. If someone's interested in doing
> actual performance tests, wants to look at the assembly or knows how
> manual loop unrolling must be done, go ahead.
You know, I did exactly that (looking at the assembly and running
performance tests) when implementing it; it may be possible to improve
it more by optimizing CPU pipelines usage, which is something I don't
know too much about. But I strongly doubt you can improve it by only
looking at the C source...
--
Alexandre Julliard
julliard@winehq.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic