[Mono-list] 32-bit vs 64-bit Performance Discrepency

Justin Holewinski justin.holewinski at gmail.com
Thu Oct 27 11:41:29 EDT 2011


On Wed, Oct 26, 2011 at 8:56 PM, Rodrigo Kumpera <kumpera at gmail.com> wrote:

>
>
> On Wed, Oct 26, 2011 at 10:12 PM, Justin Holewinski <
> justin.holewinski at gmail.com> wrote:
>
>> On Wed, Oct 26, 2011 at 7:37 PM, Rodrigo Kumpera <kumpera at gmail.com>wrote:
>>
>>>
>>>
>>> On Wed, Oct 26, 2011 at 9:06 PM, Justin Holewinski <
>>> justin.holewinski at gmail.com> wrote:
>>>
>>>> On Wed, Oct 26, 2011 at 6:15 PM, Rodrigo Kumpera <kumpera at gmail.com>wrote:
>>>>
>>>>> The CLR demands that all floating point calculations to be conducted
>>>>> with double precision.
>>>>
>>>>
>>>> Where in the spec does it state this?  Everything I've read allows for
>>>> both 32-bit and 64-bit representations, with the only restriction being that
>>>> arithmetic must be performed with enough precision for the expression type.
>>>>
>>>> And if 64-bit arithmetic is required, why is 32-bit used in the 32-bit
>>>> Mono VM, and in the .NET VM?
>>>>
>>>>
>>>
>>> 32bits mono uses 64bits precision for both float and double types.
>>>
>>
>>> AFAICT, .net uses 64bits precision on all cases.
>>>
>>
>> I'm getting code like the following on .NET 4.0 x64:
>>
>> 00000099  mov         rcx,qword ptr [rsp+000000D8h]
>> 000000a1  mov         rax,qword ptr [rsp+30h]
>> 000000a6  movss       xmm0,dword ptr [rsp+28h]
>> 000000ac  mulss       xmm0,dword ptr [rcx+rax*4+10h]
>> 000000b2  movss       dword ptr [rsp+38h],xmm0
>>
>> Is there any way to force Mono to use 32-bit arithmetic for floats?
>>
>
> No, not really.
>
> Please file a bug over this as we probably should change it.
>

Submitted as 1728.  Thanks for the help!



-- 

Thanks,

Justin Holewinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20111027/d7fb108e/attachment.html 


More information about the Mono-list mailing list