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:39:24 +0200 Message-ID: References: <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="33087"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , eller.helmut@gmail.com, emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 06 14:39:51 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 1sQ4hi-0008Tv-Qe for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Jul 2024 14:39:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQ4hQ-0000yB-4b; Sat, 06 Jul 2024 08:39:32 -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 1sQ4hP-0000xo-47 for emacs-devel@gnu.org; Sat, 06 Jul 2024 08:39:31 -0400 Original-Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sQ4hN-0000S4-H5; Sat, 06 Jul 2024 08:39:30 -0400 Original-Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-58bac81f3f9so3205126a12.2; Sat, 06 Jul 2024 05:39:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720269567; x=1720874367; 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=7jXT5I3327jWOwoZfbu4XfBR9pKFTEZ5zvx2G8I8wCk=; b=RtsOKNZWgcmUPB1hgcdn6/oyxV1IC9xQI4fQtaTxxRTS/L2P46VBzI8HBK7fqhGZKJ Ftn+aP5QJPFdRC1BjAOulJKawZqv4I8r2bRXYYx7/BNN3mqZ4mWFu/M2oMouq7RO/FuL 67+Qwjd2h3tCag1nqWMjzj+NzAfhWnyerRs2XBk+crYTmBtQ280dX9URRoAr5C2aPm8o AzYRPHUul5dO1uQrTsxCvs1jc/2WJpHt3j20emesh+jMFfKqrcvuBXhn1ugJqJPJTX/V CVj9EOkyaVoBo4SeER8okVXkKjWKfYJ0xqp/41F3ifUlh838M7KIpbHDzH1Pb0BjxFMS ATQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720269567; x=1720874367; 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=7jXT5I3327jWOwoZfbu4XfBR9pKFTEZ5zvx2G8I8wCk=; b=lCgYhY5BRfOqoHkKsyGMsFfQPp2210pvt9y98c/Ko6wPUIQ+sXJ4jemvwoz9ZPFGGa kE7vPGpcr6NeMl3xTsxGSLUWL8wD6bOShcbLxGGNiMXeKWToellXaz8p2mmAF96PoQSr LYQOP7M41vkDkzK8HJ6kF1Qli1y9hbRFD7xwGwRPQQuK+I34YaA9kkBvmMGn1Gqd1CUV fr1pSBM311Z28cRM/oMd7OtWLD4+02tcP2ryOC+PkyaDjcOCBPNTPweqfGc42RcX9tkz JzniSfpxm0hCxK8Y+7lS2W/ZVIcbww+OuwVFsNq19ZutSL6A0o+c9heB55Eu4Fg89CF8 U3Sw== X-Forwarded-Encrypted: i=1; AJvYcCVagSpVxiaR/OVQhFKCJlLW45g8ww5zeJmu/aDDHIxxgXqjKkMAhtY2mLRV2SMov5qdLCJryMg29OE9jf4X1ORnaHzG X-Gm-Message-State: AOJu0Yw1r6qTh40K6Eu7gQq1BcLc3wXzf41igSA6zncciM0aqcwIgrE0 xOU8hCdhWNk/uDlz+Y1AUFsYst9lFisHSGiPOXk68fgjqLqd/ppKrjQ+lA== X-Google-Smtp-Source: AGHT+IH5FEGLLCJMhbJWsG99sQOw5IErwGKMHguUIh3OZX8mXXGY/R9MHiLc1owNtUHH5nSHJ4HwEg== X-Received: by 2002:a05:6402:34c2:b0:58d:e458:1310 with SMTP id 4fb4d7f45d1cf-58e5acd87ccmr4093613a12.13.1720269566728; Sat, 06 Jul 2024 05:39:26 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a82e.dip0.t-ipconnect.de. [79.227.168.46]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-58f86619b5fsm1977753a12.44.2024.07.06.05.39.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jul 2024 05:39:26 -0700 (PDT) In-Reply-To: (Pip Cet's message of "Sat, 06 Jul 2024 12:23:14 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x52d.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:321432 Archived-At: Pip Cet writes: >> 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. > > I'd say maybe_garbage_collect (with suitable logic in maybe_gc to call > it once in a while; but this is the fallback so calling it rarely is > okay) plus maybe_finalize (calling it once per 1 MB of allocated > finalizable objects would be what I'd try first, though that number > may be low) plus the idle loop. That should catch all cases, I think > :-) Two guys one thought. I've done the maybe_finalize for now.