On Tue, Jul 2, 2013 at 4:07 PM, Patrick Walton <[email protected]> wrote:

> On 7/1/13 5:32 AM, Corey Richardson wrote:
>
>> Variable width floating point code is also dangerous - frequently code
>> has implicit assumptions about accuracy. Using floating point
>> correctly is already hard enough, introducing variable width types
>> makes it even harder.
>>
>
> I proposed this in the past, and Graydon objected on the principle that
> it's similar to `int` in that `float` is the size of a register, and it
> leaves the door open for 128-bit floats if CPU manufacturers ever go to
> that. I'd still personally be OK with it though: C doesn't have a concept
> of "floating point type as big as a register" (rather float is de-facto
> 32-bit and double is de-facto 64-bit). As far as I know it will probably
> never acquire such a thing, so it seems best to me to just follow C here
> and only support fixed length floating point types.
>

Seems to me you could quantify the performance impact of variable-width
types. E.g. try making 'int' 32-bit on a 64-bit architecture and see how
much it hurts. I'm suspicious they're a premature optimization.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to