English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
int_of_string bug
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-03-30 (08:44)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] int_of_string bug
On Fri, 2007-03-30 at 09:30 +0200, Florian Weimer wrote:
> * Yaron Minsky:
> > That's a problem too, but there is at least a defensible reason for
> > that, which is that it is expensive to get integer overflow to throw
> > an exception.
> i386 and amd64 have hardware support for that, so it's not very
> expensive.  There are pretty short RISC sequences for the checks, too.
> MLton uses the i386 hardware support, and I think you can disable the
> checks, so measuring the overhead shouldn't be too hard.

But there is a difference you may have missed: Ocaml integers
are 31 or 63 bits, not 32 or 64 bits. 

John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net