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: MPS: weak hash tables Date: Sat, 06 Jul 2024 14:16:55 +0200 Message-ID: References: <-plQctKgNkvp-LJ9ov2QAiXQKxd9V-hI0yz_opRGxQtbknubCjH4rH2-ymgbw_Qr1ZhB1rtlmiEW8XtuIVNr7nR_Yj20AH6WkH6kUGp68g0=@protonmail.com> <_mNcR6ailVKpYHLxgfo_tJlYGeR0AQIzQWluspYYp5_g5pIIKkHLNfFkklQQgOKNiVW8jn8NS3i2dJ7_B2Qyx9v-Dq3MQ9mP8HNL30UWsqY=@protonmail.com> <878qyf4sgm.fsf@gmail.com> <878qye3l81.fsf@gmail.com> <86a5iu4tiy.fsf@gnu.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="2973"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: eller.helmut@gmail.com, pipcet@protonmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 06 14:18:01 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 1sQ4Ma-0000WI-Un for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Jul 2024 14:18:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQ4Lh-0007Z8-Td; Sat, 06 Jul 2024 08:17: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 1sQ4Ld-0007Yh-Cj for emacs-devel@gnu.org; Sat, 06 Jul 2024 08:17:01 -0400 Original-Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sQ4Lb-0008B0-F3; Sat, 06 Jul 2024 08:17:00 -0400 Original-Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-58b0beaf703so2947658a12.2; Sat, 06 Jul 2024 05:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720268217; x=1720873017; darn=gnu.org; h=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=TWz1NkrFF6iDNoNQk+mTriwMxV6kdqumUiBFvAcS1eg=; b=XEM52dKhJA3KfxwBHVwmHKIMD5kdsevzfQzqGoEU0upsbLuMbAVsIjitvLtUHXdS+3 I3oP8N3kEJzlA1AWhtA00/JhYzjHFjgf4VQkgLzrKuoH0T1C1fl9vjT9se7K28k1IVwg eXJ6SshQBkiKqbOBsBXWQ+s3V33muuuXw0xRxQ5Z67Y4UfT9u1PQVbZzCk14wZH15YCJ obYf5Lh6+3eWy6zQoO07FqF0c7tkaEwJSGzaz+BSxol+UC80sjdKwz08W3Gh2wDrchyC g2eRHy9KEkB56wD/mSSwQQEBOubfuwyjN3fjehvLv8opEq+G/vzKgRMGLQsx5ZoV/ehg CxjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720268217; x=1720873017; h=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=TWz1NkrFF6iDNoNQk+mTriwMxV6kdqumUiBFvAcS1eg=; b=A8BG35xiCEpYRIQ4fkodpHJN9Msy8qVuXuqRutluRGvuyhBBOI8npLrf7YaueJ3iiM 58iGuj4Z8o9BYbpgQ/xbSydeuJzvCWG2nvVs8TAoh0oiybf1rDl/XPZq7enySurVmY6N GHHX34C6j8fJFnCI6VEj1E3zWeNB6upJkkMxvILbB4CJtvH9PxDuRyovW4ecJ60DesSk C+I0yYAKyNF09dTj9RdEmRyP5QT0aErhfDAWqE7XqYmmxjiypWwbKqeUoMa40GIZ6F1H rT0dKJFHM5MwuUT02czG/nMlikycfwbAw09bveYejhtiGuBA30qSwUArP6ah9Xy5LS9c VW/g== X-Forwarded-Encrypted: i=1; AJvYcCUpdJ+SwHQH+qh32atjv6us41oKBBCunT39SivQoYMVDk3VmRMpnQNNjhaCmvuHQ4TBVIQmoeOcsgKQ3oyt1IgYXUnH X-Gm-Message-State: AOJu0YxTfiSkm/Ug69UVxnkpNPdXqlZy5vukZYSfGH0G+EaRYcse2ZcO 2QiuL+q2wMKcOaALgnrP68kFGDBJ3MeheCwgbDcTcZuZostxuJPQmm5IOw== X-Google-Smtp-Source: AGHT+IH98eSPWiY5PPtLrpC5HgcoRFcICFjTczgu0BVTN7WbNiwtwdAMoovG8E1+fwSo7QHkZ+f9NQ== X-Received: by 2002:a17:906:c292:b0:a77:e0ed:8bc with SMTP id a640c23a62f3a-a77e0ed0ab5mr119679466b.4.1720268216640; Sat, 06 Jul 2024 05:16:56 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a82e.dip0.t-ipconnect.de. [79.227.168.46]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72ab0b889dsm767625566b.225.2024.07.06.05.16.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jul 2024 05:16:56 -0700 (PDT) In-Reply-To: <86a5iu4tiy.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 06 Jul 2024 15:03:17 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x531.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-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:321428 Archived-At: Eli Zaretskii writes: >> Which poses the question where can we put that igc_process_messages, so >> that it doesn't get too expensive (if it is), but is regularly enough >> called even if not idle. >> >> Maybe_quit, maybe_gc, specbind? Any other ideas? > > maybe_gc, I'd say. But the conditions for actually calling GC will > have to change, of course. Or another idea: We allocate bignums in igc. Every N bignum allocations, take some time to process messages and thus finalize them. I have no idea what a good N would be thpugh. We could try with 1000 and 0.1s, maybe. This also assumes that only bignums are allocated frequently plus must be finalized. Don't know if that's true.