From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Using the GNU GMP Library for Bignums in Emacs Date: Wed, 18 Jul 2018 09:17:28 -0400 Message-ID: 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 Content-Type: text/plain X-Trace: blaine.gmane.org 1531919783 16011 195.159.176.226 (18 Jul 2018 13:16:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2018 13:16:23 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 18 15:16:19 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 1ffmJW-00044G-MD for ged-emacs-devel@m.gmane.org; Wed, 18 Jul 2018 15:16:18 +0200 Original-Received: from localhost ([::1]:36650 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffmLd-0007Iy-EL for ged-emacs-devel@m.gmane.org; Wed, 18 Jul 2018 09:18:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffmKq-0007Io-DP for emacs-devel@gnu.org; Wed, 18 Jul 2018 09:17:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffmKm-0000lf-Ea for emacs-devel@gnu.org; Wed, 18 Jul 2018 09:17:40 -0400 Original-Received: from [195.159.176.226] (port=51845 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffmKm-0000lU-6R for emacs-devel@gnu.org; Wed, 18 Jul 2018 09:17:36 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1ffmIc-0003B5-Ol for emacs-devel@gnu.org; Wed, 18 Jul 2018 15:15:22 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:8wGfsHsdfGL/vNWgog6lRz6ZuMQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:227540 Archived-At: > 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, Indeed (tho I have this patch installed in my "regular Emacs", so I use it daily). > 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. I don't understand what you mean: the patch changes `EQ` itself: -# define EQ(x, y) lisp_h_EQ (x, y) +# define EQ(x, y) EQL (x, y) where EQL is the same as Feql (except it returns a boolean instead of a Lisp_Object). Some uses of EQ admittedly don't need to be redirected to EQL, so we could improve the patch to reduce its cost, but I expect the benefit would be small. > Also, the C code will need to change how hashing works since XHASH > etc. must be consistent with eq. The patch does that already, AFAIK. Stefan