From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: Using the GNU GMP Library for Bignums in Emacs Date: Sun, 22 Jul 2018 08:06:02 -0400 Message-ID: <1452F858-C7FD-4AEB-BB85-D874692F918F@raeburn.org> References: <29f933ac-a6bf-8742-66a7-0a9d6d3e5a88@disroot.org> <83bmecy6fx.fsf@gnu.org> <0d3175d8-d996-651e-b221-71978bde3a65@cs.ucla.edu> <87tvpdnzgy.fsf@tromey.com> <4c2a814f-c254-29e5-39cf-11b5f2e5c9c8@cs.ucla.edu> <49d8ba62-c9a5-9203-d882-8e900b441ff3@cs.ucla.edu> <8e0320d9-e0d0-2b57-57cc-2df4399f133c@cs.ucla.edu> <87lgaio7xd.fsf@tromey.com> <877em1cb0i.fsf@tromey.com> <765767b2-d2e5-a9a6-f724-d58ecf4847bb@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1532261090 5661 195.159.176.226 (22 Jul 2018 12:04:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 22 Jul 2018 12:04:50 +0000 (UTC) Cc: Tom Tromey , emacs-devel@gnu.org, Stefan Monnier , Richard Stallman To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 22 14:04:45 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fhD6S-0001Jb-Io for ged-emacs-devel@m.gmane.org; Sun, 22 Jul 2018 14:04:44 +0200 Original-Received: from localhost ([::1]:55869 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhD8X-0008CE-Iq for ged-emacs-devel@m.gmane.org; Sun, 22 Jul 2018 08:06:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhD7p-0008Bm-GY for emacs-devel@gnu.org; Sun, 22 Jul 2018 08:06:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhD7m-0004AQ-Bt for emacs-devel@gnu.org; Sun, 22 Jul 2018 08:06:09 -0400 Original-Received: from mail-yb0-x232.google.com ([2607:f8b0:4002:c09::232]:44236) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhD7m-0004A3-6W for emacs-devel@gnu.org; Sun, 22 Jul 2018 08:06:06 -0400 Original-Received: by mail-yb0-x232.google.com with SMTP id l16-v6so6265818ybk.11 for ; Sun, 22 Jul 2018 05:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raeburn-org.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=EHEDnp6n+U2EePDz+TnMY4iz7v/4i3YlxhOH0RnuGmE=; b=sBiiBxx/LtPKPhLKYktHyQZe+5+CQlvkwvg2C9SOSMEdOjfeEFQFXct+NHSZl3jjWl PtpcMMBPuJcB/n8sDkNPNVSwHW0WGGTba+VPPZhJJYQt0jB4wPMd6HuuK80kX7TDSjlY GW5NmQoHm6xCMBvMjEkLvuT+ITFKwSgKP2DLMotrIxb6LimSWCofvEHRx3Vw+J3zxhc/ hjTKDWgg7l83OKem0k9RJ2IKhj4qi5KTcAlYMa6ZVsjemgH3niVH4buatfOMsdyIS0L9 L7Bc4AvMiX+5kyy1vtiek6HlPEiSS7Czja3n4m53GZ6k4YUnB2UPxSrx6DUck84HfjJB /IQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=EHEDnp6n+U2EePDz+TnMY4iz7v/4i3YlxhOH0RnuGmE=; b=LKp5L6AS+yoM/BwsmV/nKADFDgYobrjPip6PWVUglb+FeHQz8FIuuoTi7POathhq1y EA+lEFRgp59p91JpnqvpdZkTyQHw5F0CwgXaFC0jSdVaH4XX7cRQrzH29WRH+fiyXpy4 PCkEqWqOD5L7D7fqL3xhK0QgOkF7VFdDr93hhFZBrjgTDG4qAxwpxrmLfzvhxCFwo+S3 KonY8lFNmZHMn39Ghc4CI7p/t6CTRb2snAgS26iQYEY/fvEAMs9QFZNwmW1pxeILlGTy Qwo+vMbNOa3rdOoNRuo+oOw1FMsCqeKFthVID6l/1CiWBHc6iCiOVziFDodG2Wxz8U8S zPFw== X-Gm-Message-State: AOUpUlFmEV3W8wfkSaIxBAsAQz7bNM7I/ADOxzzavE5JlI6yXihNPhBS /m4n5/MjiVuuSKAwZ4v3ePLVtQ== X-Google-Smtp-Source: AAOMgpcWCzS3SP70pNUyMGX5GdcbHO7GlezyaL9geDXe7JTM5KdvUQ2u369xA5Rz6+swn3LY1Z/hYw== X-Received: by 2002:a25:b44d:: with SMTP id c13-v6mr4723438ybg.231.1532261165306; Sun, 22 Jul 2018 05:06:05 -0700 (PDT) Original-Received: from [192.168.23.135] (c-73-253-167-23.hsd1.ma.comcast.net. [73.253.167.23]) by smtp.gmail.com with ESMTPSA id h145-v6sm3506210ywc.3.2018.07.22.05.06.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jul 2018 05:06:04 -0700 (PDT) In-Reply-To: <765767b2-d2e5-a9a6-f724-d58ecf4847bb@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.6.18) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c09::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:227660 Archived-At: On Jul 18, 2018, at 06:20, Paul Eggert wrote: >=20 > Stefan Monnier wrote: >> I recently posted a patch which makes EQ behave like `eql` attached. >> I just tried to see its impact on the ELisp compilation time >> (i.e. I did `rm **/*.elc; make`). >=20 > I tried to reproduce this on my machine, and ran into some trouble = (the code had warnings that caused compilation to fail). Although your = patch is evidently intended only as a quick benchmark and not as an = actual change, I worry that the benchmark isn't realistic enough, as = some usage of EQ in C code will need to change to Feql or equivalent. = Also, the C code will need to change how hashing works since XHASH etc. = must be consistent with eq. >=20 > Looking into this a bit more, I discovered that eql currently operates = incorrectly on NaNs, as it's inconsistent with how hash tables work. I = installed the attached patch into master to fix that. If we=E2=80=99re going to treat NaNs as having distinguishable bit = patterns so we can tell whether two are the same or not, should we also = have printable/readable forms that distinguish them? If not, how do we = create and use distinguishable NaNs? For that matter, are we guaranteed that operations like (/ 0.0 0.0) will = always generate NaNs with the same bit pattern? I would=E2=80=99ve guessed that it might be preferable to go the other = direction, and use one canonical NaN value in Lisp, which would thus = always be eq/eql to all other NaN expressions. Ken=