[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: msvcrt: Don't depend on the system's implementation of acos () &
From:       "Dan Kegel" <dank () kegel ! com>
Date:       2008-08-29 21:10:30
Message-ID: a71bd89a0808291410g9a8e2efu7a8a7bd450b612e7 () mail ! gmail ! com
[Download RAW message or body]

On Fri, Aug 29, 2008 at 11:15 AM, Henri Verbeet <hverbeet@gmail.com> wrote:
> 2008/8/29 Michael Stefaniuc <mstefani@redhat.com>:
>> Wouldn't it make more sense to put the sane acos and asin
>> implementations in libs/port and use them only if the system provided
>> versions are broken? It should be possible to have configure check that.
>> That way we can use the probably optimized versions on the sane systems.
>>
> Possibly, but compiling on a sane system doesn't necessarily mean
> you'll run on a sane system as well. In terms of performance it's all
> rather suboptimal either way though. Eg. in the case of C&C Generals
> you enter msvcrt through _CIacos() with a double in %st(0). We then
> pop that to CPU memory and pass it to MSVCRT_acos(), which passes it
> to acos(), which pushes it onto the FPU stack again. Performance wise
> it would make more sense to write our own implementation in asm inside
> _CIacos() and have MSVCRT_acos() call that.

How performance-critical is this stuff?  Supporting our own
trig routines is a difficult undertaking, not to be taken lightly...


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic