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?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: Question about bignum usage Date: Thu, 20 Jun 2024 08:34:22 +0200 Message-ID: References: <86frt8nn8b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25588"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 20 08:35:16 2024 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 1sKBO8-0006Qe-J3 for ged-emacs-devel@m.gmane-mx.org; Thu, 20 Jun 2024 08:35:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKBNN-0006tv-F9; Thu, 20 Jun 2024 02:34:29 -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 1sKBNL-0006rm-Ih for emacs-devel@gnu.org; Thu, 20 Jun 2024 02:34:27 -0400 Original-Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sKBNK-0001yN-1G; Thu, 20 Jun 2024 02:34:27 -0400 Original-Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a63359aaaa6so54285666b.2; Wed, 19 Jun 2024 23:34:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718865264; x=1719470064; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wEs7Dsa555kIiGBgcLHDlW+ahUud5RLHBu9Df1UykQ4=; b=DTiEDJyMmS+Ajimof0kxM3Tf8/jqjJwY28lrGK/sKR4s/tT6qRTbuRx7qB4YuOCKFV amwzjUzLzJNuo0SK81AA+4Y2h5dDEQpo1XriZYcGObUPk/Hg7DiKNq1a2efeSDNRs3r0 yhaCH/IIG8vAzjozbs+3mg2Hr7r1oqBuB8eJ9SH23xKBz8wZUxRpiRQSBe+/6RgFiuHd XNGj7IJ6GgE70o61vHP4jr0qCkOSRdxZsm5UoAmVyDR+zs5o+A1FPgGK1sHjUEqQmF5h I+wOcPquiuamn0jH/SFfzhJtnDRi9u8JzbpGcnxvji/vnUuMMozhwKbUlB5iJlxUdsn1 jwVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718865264; x=1719470064; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=wEs7Dsa555kIiGBgcLHDlW+ahUud5RLHBu9Df1UykQ4=; b=DvFVS2e6kiJU7VE7qE7slWUxEKt8xu8ZrB7uvlaGYn3u/2ncTfnIyLrcHo3lx255CH wAyHEZzuqyRol6Nscqmobuft4nsIxK4a4z+zIeuqhXcunwKFQ1T1xGW27NB6vXY9agPS w4Yh4Q76dstMb1Bl05Woo/2pqqLsc29CgbLAuMb6iTCS+XuURFpIl6OYma2ynaRnaqi5 yhbqLWtvbtkWWJYx9GIaoRkmdmUO1erSPeAqxSBtm8a7nWZsD8jHqtRbajIMZvx3AV8I EaEukOpH/zER6jRW7PR9czIPq8t4L/y07+GGgzsTGSlD5XoXUjX2Cz2IMFRf5y/MAbq0 UlJQ== X-Gm-Message-State: AOJu0Yzclx2dkiObUOYBHda7AKci5bNoMYdxoDF++/8vyy90hoaqZBng 9+EMiMCWhDaP+M+d71xbXqu7taV8EA/KGBgCy/r7gg45N0PUYwRs6Kd09g== X-Google-Smtp-Source: AGHT+IGHsZJ6OySk1uCJAm31GlPoHhUXvkrzrr26mO7CH4HpjP2t1mXvlGX1nqxPq1rSu6p1QMJQcQ== X-Received: by 2002:a17:907:9493:b0:a6f:576e:4d32 with SMTP id a640c23a62f3a-a6fab60bc1cmr288616966b.4.1718865263488; Wed, 19 Jun 2024 23:34:23 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a551.dip0.t-ipconnect.de. [79.227.165.81]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56f988cdsm730315066b.193.2024.06.19.23.34.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 23:34:23 -0700 (PDT) In-Reply-To: <86frt8nn8b.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 20 Jun 2024 09:26:44 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x62b.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, T_SCC_BODY_TEXT_LINE=-0.01 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:320311 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Date: Thu, 20 Jun 2024 07:59:36 +0200 >>=20 >> In the igc branch, I see that Emacs creates bigints in an rate that I >> find astonishsing, thousands in a few minutes. Most backtraces look like >> this. >>=20 >> * frame #0: 0x00000001000f9ce8 emacs`make_integer_mpz [inlined] make_b= ignum_bits(bits=3D71) at bignum.c:99:7 [opt] >> frame #1: 0x00000001000f9ce8 emacs`make_integer_mpz at bignum.c:170:= 10 [opt] >> frame #2: 0x00000001001beb48 emacs`decode_time_components(form=3DTIM= EFORM_HI_LO_US_PS, high=3D, low=3D, usec=3D, psec=3D, result=3D0x000000016fdfde50, dresult=3D0x000= 0000000000000) at timefns.c:812:27 [opt] >> frame #3: 0x00000001001be7e4 emacs`list4_to_timespec(high=3D, low=3D, usec=3D, psec=3D, res= ult=3D0x000000016fdfdec0) at timefns.c:1008:7 [opt] >> frame #4: 0x00000001000e1c98 emacs`timer_check [inlined] decode_time= r(timer=3D(struct Lisp_Vector *) $2 =3D 0x000000010ab42538, result=3D0x0000= 00016fdfdec0) at keyboard.c:4648:10 [opt] >> frame #5: 0x00000001000e1c54 emacs`timer_check at keyboard.c:4713:10= [opt] >> frame #6: 0x00000001000e1b44 emacs`timer_check at keyboard.c:4856:18= [opt] >> frame #7: 0x00000001000df51c emacs`detect_input_pending_run_timers [= inlined] readable_events(flags=3D1) at keyboard.c:3577:5 [opt] >> frame #8: 0x00000001000df518 emacs`detect_input_pending_run_timers [= inlined] get_input_pending(flags=3D1) at keyboard.c:7859:42 [opt] >> frame #9: 0x00000001000df508 emacs`detect_input_pending_run_timers(d= o_display=3Dtrue) at keyboard.c:11563:5 [opt] >>=20 >> Is this expected? > > Why not? Time values are known to produce bignums, yes.=20=20 Ok. > What does list-timers show on that system? 1.0s 5.0s auto-revert-buffers 5.4s - undo-auto--boundary-timer 4m 19.0s 5m persistent-scratch-save * 0.1s t show-paren-function * 0.5s t posframe-hidehandler-daemon-function * 0.5s t #f(compiled-function () # [jit-lock--antiblink-grace-timer jit-lock-context-fontify]) * 0.5s :repeat blink-cursor-start * 1.0s t which-key--update