From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: Bignum performance (was: Shrinking the C core) Date: Fri, 11 Aug 2023 16:14:07 +0200 Message-ID: <26B18981-426C-4A4B-BF01-7C30E38D03A1@gmail.com> References: <20230809094655.793FC18A4654@snark.thyrsus.com> <87il9owg0f.fsf@yahoo.com> <83fs4rjq9j.fsf@gnu.org> <87jzu2tvfc.fsf@dataswamp.org> <87y1ih3mc1.fsf@localhost> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5483"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Aug 11 17:21: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 1qUTwo-0001BS-1F for ged-emacs-devel@m.gmane-mx.org; Fri, 11 Aug 2023 17:21:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qUTvp-0000po-9p; Fri, 11 Aug 2023 11:20:05 -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 1qUSu7-0002aF-JC for emacs-devel@gnu.org; Fri, 11 Aug 2023 10:14:15 -0400 Original-Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qUSu6-0000PQ-1v for emacs-devel@gnu.org; Fri, 11 Aug 2023 10:14:15 -0400 Original-Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2b9ab1725bbso31455811fa.0 for ; Fri, 11 Aug 2023 07:14:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691763250; x=1692368050; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=Q/Yv51Rrr+Y5TRsOp7HT9GtHNJoGJ/NHmUUR6xPc3as=; b=lINFuvXDeDSxJZtjUx8kB5cUKNtua0hVkPt7Mx4dKVDd7U8zbBUnFeRWYaf3ByRqJ/ dD57b4Y85uhSvVWuHiKJdrgV2QNNBoRJAROezw42L6gjx/akv1OsAA1ZW+ULEcy7TFnu q/Df2N3cMpcfr3tWKDRw4hxpoO9d9br9mWpc6IP9lCtiLVKGO2JTL15rsd8Io8YUQHoT k11CQxCoEv4VBJA7j0ow9hY+EpVIo5leyecIe2yRwbDGBTsSQg9/LR6oD2qQ+ov/hx/s clJKNcq1XBSdciT/3p3iG0y3NecEa5bc9SioMh+KZTupSOMHjwzLTvL16jFMAKyFOsws avGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691763250; x=1692368050; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Q/Yv51Rrr+Y5TRsOp7HT9GtHNJoGJ/NHmUUR6xPc3as=; b=EeyrnoACF1RP9mFrH9D4Gsk7Lhs/yvyoYhVa3v5hXOMGgUr9inDS+yzMaQBb7DpMsC b5dSy2+jI0tm1pIoAxUkmeXpyQia0wSUoPvKdC3Y8rCc0hBQtPvCcSAExJJeiqIDEiIE I3i8fvU+ELBheZCxlGzBjL+OZ+f2mh5l24jVmIlLNe01DZRpSUntCyRgaRofcXkbaRAV 2O/BejgQYMniwt3DLSYPBSyFrTMxXE4awaFLCPX62hrcGaebgqLupdTnVf9eGuAUqPuu 5LI3lL4Ys6rdRXhGT6dWwICwCdTpcLf8CBnFBwydhpy41gx7K/RYIDXPJkVr8okAWzcw IhgQ== X-Gm-Message-State: AOJu0Yy0DAIouZPQFIYmrh+FLsfz/eolV0M3YwPUY1RQUJIO3aIlsQnZ Kjqhqdl48C0a1nX+odoDTfo= X-Google-Smtp-Source: AGHT+IEsIq0rboQWOD1IdLXMdQMv3hgXr4J33YI1NNkirxLu0bSFPzrc0i18OpKzdx6XoA3XpGg26w== X-Received: by 2002:a2e:9018:0:b0:2b6:e536:a2a3 with SMTP id h24-20020a2e9018000000b002b6e536a2a3mr1778056ljg.19.1691763249569; Fri, 11 Aug 2023 07:14:09 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id u15-20020a2e9b0f000000b002b9f0fb5f20sm888064lji.72.2023.08.11.07.14.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Aug 2023 07:14:09 -0700 (PDT) In-Reply-To: <87y1ih3mc1.fsf@localhost> X-Mailer: Apple Mail (2.3654.120.0.1.15) Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=mattias.engdegard@gmail.com; helo=mail-lj1-x231.google.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 11 Aug 2023 11:20:03 -0400 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:308583 Archived-At: 11 aug. 2023 kl. 12.27 skrev Ihor Radchenko : > Most of the time is spent in (1) GC; (2) Creating bigint: This is well known. The reason for bignums being in Elisp is because = their very presence is helpful in several ways. They really only need to = be correct; speed is a secondary concern (and GMP is actually overkill; = mini-GMP is fine). I'm not aware of any useful Elisp code that is bignum-intensive. The = nearest is perhaps using Calc for certain kinds of algebraic operations = but even there, bignums are rarely a significant performance factor. Making the allocator and GC faster in general is useful since it = benefits everything. Just speeding up bignums, not so much.