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 SAA15946; Mon, 14 Jun 2004 18:17:48 +0200 (MET DST) 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 SAA20047 for ; Mon, 14 Jun 2004 18:17:46 +0200 (MET DST) Received: from eris.rz.uni-saarland.de (eris.rz.uni-saarland.de [134.96.7.8]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i5EGHjEV007842 for ; Mon, 14 Jun 2004 18:17:45 +0200 Received: from cs.uni-sb.de (cs.uni-sb.de [134.96.254.254]) by eris.rz.uni-saarland.de (8.12.10/8.12.10) with ESMTP id i5EGHiYN15026179 for ; Mon, 14 Jun 2004 18:17:44 +0200 (CEST) Received: from mail.cs.uni-sb.de (mail.cs.uni-sb.de [134.96.254.200]) by cs.uni-sb.de (8.12.11/2003091100) with ESMTP id i5EGHhpY022025 for ; Mon, 14 Jun 2004 18:17:43 +0200 (CEST) Received: from ps.uni-sb.de (grizzly.ps.uni-sb.de [134.96.186.68]) by mail.cs.uni-sb.de (8.12.11/2004041400) with ESMTP id i5EGHhYq022531 for ; Mon, 14 Jun 2004 18:17:43 +0200 (CEST) X-Authentication-Warning: email: Host grizzly.ps.uni-sb.de [134.96.186.68] claimed to be ps.uni-sb.de Received: from ps.uni-sb.de (groove.ps.uni-sb.de [134.96.186.172]) by ps.uni-sb.de (8.12.10/8.12.10) with ESMTP id i5EGHesL002426; Mon, 14 Jun 2004 18:17:40 +0200 Message-ID: <40CDCFA4.7080806@ps.uni-sb.de> Date: Mon, 14 Jun 2004 18:17:40 +0200 From: Andreas Rossberg User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] More or bignums/ints References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-AntiVirus: checked by AntiVir Milter 1.0.6; AVE 6.25.0.62; VDF 6.25.0.94 X-Miltered: at nez-perce with ID 40CDCFA9.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; rossberg:01 rossberg:01 uni-sb:01 caml-list:01 bignums:01 supplies:99 entails:01 shootout:01 mlton:01 mlton:01 uni-sb:01 compiler:01 implements:01 ints:01 ints:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Brian Hurt wrote: > >>I was a little depressed >>to find (by trial and error) that "int" doesn't mean "integer" but >>rather "element of Z/nZ for some very large n, represented with >>integer notation, including negative signs." > > Yep. Generally mod 2^n for some n. This is because this is what the > hardware supplies for fast integer arithemetic. "Fixing" this, so that > ints are real (mathematical) integers entails a *huge* performance cost, > for very little gain. I believe it is not too significant for most applications. And it could easily be subject to the no-bound-checks compiler switch, to satisfy performance junkies and number crunchers. > How big of a performance hit, I don't know. I note that on the Great > Language Shootout page, SML/NJ has a much lower performance score than > Ocaml or MLton. Note that MLton also implements overflow checks, because they are required by the SML language/library specification. Cheers, - Andreas -- Andreas Rossberg, rossberg@ps.uni-sb.de Let's get rid of those possible thingies! -- TB ------------------- 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