|
From: | Paul Eggert |
Subject: | Re: Some vars now limited to fixnum size. (Was: Merging bignum to master) |
Date: | Mon, 20 Aug 2018 21:09:12 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
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. :-)
[Prev in Thread] | Current Thread | [Next in Thread] |