Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Does Caml have slow arithmetics ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Diego Olivier Fernandez Pons <Diego.FERNANDEZ_PONS@e...>
Subject: Re: [Caml-list] Does Caml have slow arithmetics ?
    Bonjour

> In principle yes, because int values are represented as tagged
> (31bits) ints (with the LSB set to 1). So conversion is a shift
> followed by an addition (or viceversa).

Subsidiary question : why LSB instead of MSB ? I thought it would be
simpler to let the computations silently overflow and correct when
necessary the tag bit.

        Diego Olivier


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners