From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA23073; Thu, 30 Oct 2003 20:40:19 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA23062 for ; Thu, 30 Oct 2003 20:40:18 +0100 (MET) Received: from qrnik.knm.org.pl (paf87.warszawa.sdi.tpnet.pl [217.96.225.87]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h9UJeH122750 for ; Thu, 30 Oct 2003 20:40:17 +0100 (MET) Received: from qrnik ([192.168.0.1] ident=qrczak) by qrnik.knm.org.pl with esmtp (Exim 3.36 #1) id 1AFIeW-0004hB-00 for caml-list@inria.fr; Thu, 30 Oct 2003 20:40:16 +0100 Subject: Re: [Caml-list] Int overflow in literals From: "Marcin 'Qrczak' Kowalczyk" To: caml-list@inria.fr In-Reply-To: <200310301420.17420.oleg_trott@columbia.edu> References: <1067522012.5880.6.camel@qrnik> <3FA14C4C.2010608@baretta.com> <3FA15194.DAA6045F@decis.be> <200310301420.17420.oleg_trott@columbia.edu> Content-Type: text/plain; charset=iso-8859-2 Message-Id: <1067542816.17298.1.camel@qrnik> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Thu, 30 Oct 2003 20:40:16 +0100 Content-Transfer-Encoding: quoted-printable X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 marcin:01 'qrczak':01 kowalczyk:01 qrczak:01 oleg:01 pisze:01 overflows:01 silently:01 -unsafe:01 marcin:01 kowalczyk:01 qrczak:01 variants:01 int:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk W li=B6cie z czw, 30-10-2003, godz. 20:20, Oleg Trott pisze: > I'm also curious if raising an exception in case of arithmetic overflows > instead of silently accepting them would have a significant performance > impact on modern CPUs - few, if anyone, mean to do mod 2^31=20 > arithmetic. Perhaps it should be like array bounds checking: separate functions for both variants, with + resolving to either depending on -unsafe option? --=20 __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ ------------------- 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