Browse thread
int_of_string bug
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2007-03-30 (09:01) |
From: | Andreas Rossberg <rossberg@p...> |
Subject: | Re: [Caml-list] int_of_string bug |
skaller wrote: >> >>> 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. But it uses the most significant 31/63 bits for ints, so that becomes a non-issue. ;-) -- Andreas Rossberg, rossberg@ps.uni-sb.de