From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Re: Bignum performance Date: Wed, 16 Aug 2023 11:17:01 +0800 Message-ID: <874jkzllqq.fsf@yahoo.com> References: <87bkfartof.fsf@localhost> <175cf474-29c8-a482-072e-0de784ac59e8@gmail.com> <87o7jaqc31.fsf@localhost> <2d419e12-9239-de3e-47d0-38815a00025f@gmail.com> <87msyth8jh.fsf@dataswamp.org> <871qg4n7n4.fsf@yahoo.com> <87wmxwfk9r.fsf@dataswamp.org> <87leeblqly.fsf@yahoo.com> <87v8dfepil.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16904"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 16 05:18:06 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qW72r-00049s-Tv for ged-emacs-devel@m.gmane-mx.org; Wed, 16 Aug 2023 05:18:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qW722-000344-Az; Tue, 15 Aug 2023 23:17:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qW720-00033w-Nr for emacs-devel@gnu.org; Tue, 15 Aug 2023 23:17:12 -0400 Original-Received: from sonic310-25.consmr.mail.ne1.yahoo.com ([66.163.186.206]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qW71y-0003Hp-GH for emacs-devel@gnu.org; Tue, 15 Aug 2023 23:17:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1692155828; bh=+0OFnOLIFDhZU0hO3d52VgKUFY2JzI4sgv2P/baFEe4=; h=From:To:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=lYxwgoj9HGeDiZ/kH5+dTbgiM/fJCulnUzDc9rRcl4L/Pbsf6MjpxRcnbvyp0iRVoJWNBzynjgHAxahe45MG0qgFDPkKQLxh7nfNq+ww3yqE72YmRMxuPxlZmYgImWznAhCTb6a9zruwfe6EZKQAgbNrTJ/GyF0Ji6DtHIUHirku+aXmQUrGoh8s/ssJV+9pcz+vf6pCX745mACmRoNnj36f6dh8lVcsRbgxGza57UWEwFT2hkhybbSSBoyMN5hzLc4ECPiZA9bFsopQXPiiJYXFU9vY5EoZEkWgoOEx7wC3cKzGY0fPDb5W6SQ6n9B1PMq1EePUDQliKK7mE8U69A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1692155828; bh=mI89soxzOf9RnfaeCDjDXDvd2x0y9oPsa3axp2/OE3W=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=QCBoxNsre+i5JveuzNvbeM9Ngj+fQ1mn9+Jh618hDxMPLiwxLWePqjpxf/PlVxZ7oD6kfaWRnKv4hChlxbqY+bvt0ReDyUG3nDV/HYBRKrWrLecSwI1kDL8MNiAhXbXHfTHkFT/Ihb6ubk9IRNiLBlJn6x6LZWFr60oQlm/KbgC1ure2kR4qCmcCd6rPbwaUNwk8G4cC6mU+EUrAXAp+gzIbv3q4WzKfT8pcoteiZAWiv7FTSE5WwovdTbPKF/ZMSU9vMsZ4dO1FR+aLppik2To18i8tE5VNMQkHUrRomNciGbB/5+sKEVP8rKYFeNZu1OmyIHSq5nLtObGuOA2Cvw== X-YMail-OSG: MgZV0kQVM1lrDXiMF1xPLsmPPZYNu.UzK021W_Zz.tMQDTV_HjvR6hwol8TMcCY 1rFmVQ1qllCNBhJ.5BXRAPZjEWX52I9Ijw7aaPT2skZkRTis20TXtdAA6HJZ4GQ3_glIPIOYErY. FWEgqPEwgVb0Eps7A33x8O77auIF.l7SKkithxZJmRKwQaKNx020xB5dTMgfF5AmyDx6OF3Em1zh 2d5YUDFCfjjmFBUyv1TuQhg4eWRoUqK5CZoNcHMevqxZNM6sq28966EYi7qiWk3q0PPW_eEekB05 NZK37qtq5URNli_tFCGx1JzfYP.ZPPTMVSe_sibOFmR1meuRB795YUTGaCW2lNpvHMAoADoYyun7 vTpDOzF6oUprg1WRfTKWSWtmx4nTrL4Ywv._IL7nDj9PC.CAHpABOg1HNxJ.yauNANipbWfqzyDp CT8fg0CDwvMOUBSNB2sIGktKir9fSuSsXaNZebQT_FKfLCUHl8QfeQwShPgVAwHoUR2o_hpRxKib yHPprmWIMU6.cGI_DD.fG1XR2MOhS_rH4D1RaQOhZPoA7XHncoUEjC5kapB6cAi0nofUufZzkDbU uyZWB00mLtJawpry.cyd2Mhw2yIciJQXo5BMeqmNDZVGKMQM4qZ4PWaJ_8fPcxxLbvqRL6yYbBkf 1Fv0Ruv07hWaLIBvWhdWuRGAATnUBCijM9PbarAEJHRG2cUVwzJBGTfK.aPdtToIEPIEEYPrt3FC Cr75WahOtZyjnDQSifs.Thqjib27.OEWD1p_ls1mDDxysWsa.Rxffd0V.BiGANtZBnKMbDOOV8KT Up6nK_ddRWwHMy3KWBDtGZnCpxqWb8hAaT5VvocAfB X-Sonic-MF: X-Sonic-ID: b0717ae8-4eca-4c18-aeea-cfa94888ed52 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Wed, 16 Aug 2023 03:17:08 +0000 Original-Received: by hermes--production-sg3-69654d8bd-tsbjv (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 52d0ab2ef3bfebed97daeaec4355785b; Wed, 16 Aug 2023 03:17:06 +0000 (UTC) In-Reply-To: <87v8dfepil.fsf@dataswamp.org> (Emanuel Berg's message of "Wed, 16 Aug 2023 03:37:22 +0200") X-Mailer: WebService/1.1.21732 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.186.206; envelope-from=luangruo@yahoo.com; helo=sonic310-25.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:308790 Archived-At: Emanuel Berg writes: > Po Lu wrote: > >>>> Under Arm64, general purpose integer registers are 64 bits >>>> wide. That is also the word size of said machine. >>> >>> If they are, the range for fixnums is >>> >>> (list (* -1 (expt 2 (1- 64))) >>> (1- (expt 2 (1- 64))) ) >>> >>> (-9223372036854775808 9223372036854775807) >>> >>> Only after that it gets slower :P >> >> Lisp systems normally set aside several of the high or low >> bits of a register as a tag linking a type to the >> object represented. > > But here we are at the CPU architecture level (register > length), surely Lisp don't meddle with that? > > No, I sense that it is, actually. So please explain, then, how > it works. And in particular, how many bits do we (Elisp and > CL) actually have for our fixnums? I don't know about SBCL, but as for Emacs, refer to the definition of VALBITS in lisp.h (maybe also the right files among m/*.h and s/*.h, but I have no idea where they've disappeared to.)