From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Some vars now limited to fixnum size. (Was: Merging bignum to master) Date: Mon, 20 Aug 2018 21:09:12 -0700 Organization: UCLA Computer Science Department Message-ID: <6bb0eda0-b408-242c-f584-9b358188af93@cs.ucla.edu> References: <877ekwu1mn.fsf@tromey.com> <611579fd-52f2-0104-ef82-a7a4a3929700@cs.ucla.edu> <878t51t32a.fsf_-_@red-bean.com> <28fcabff-d102-d67f-442f-f59eab5040c9@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1534824445 29004 195.159.176.226 (21 Aug 2018 04:07:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 21 Aug 2018 04:07:25 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 Cc: kfogel@red-bean.com, tom@tromey.com, pipcet@gmail.com, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 21 06:07:21 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 1frxwu-0007RV-3Y for ged-emacs-devel@m.gmane.org; Tue, 21 Aug 2018 06:07:20 +0200 Original-Received: from localhost ([::1]:50576 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frxz0-0003lo-Ge for ged-emacs-devel@m.gmane.org; Tue, 21 Aug 2018 00:09:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frxyr-0003lV-47 for emacs-devel@gnu.org; Tue, 21 Aug 2018 00:09:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1frxym-0004aR-6A for emacs-devel@gnu.org; Tue, 21 Aug 2018 00:09:21 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:59284) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1frxyl-0004Zx-V6; Tue, 21 Aug 2018 00:09:16 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DC852160192; Mon, 20 Aug 2018 21:09:13 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ndCdc2gaeaRb; Mon, 20 Aug 2018 21:09:13 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2FC9D1605B1; Mon, 20 Aug 2018 21:09:13 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ab0Cy1Ct_1ni; Mon, 20 Aug 2018 21:09:13 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [47.154.30.119]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id A4DBF160192; Mon, 20 Aug 2018 21:09:12 -0700 (PDT) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 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:228777 Archived-At: Richard Stallman wrote: > If n is a bignum, how many years would it take for nthcdr to return? It'd be a tiny fraction of a year. Nanoseconds would be a better unit of measure. I just timed the following test case with n == 2**61 (a bignum) on a 2-element circular list: (setq circular (list 1 2)) (setcdr (last circular) circular) (setq n (ash 1 61)) (nthcdr n bench-circular) On my circa-2010 64-bit desktop with Emacs master, the nthcdr call consumes 160 nanoseconds. (You asked "how many years": it's about 5 femtoyears. :-)