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: dangling markers Date: Sun, 30 Jun 2024 15:15:03 +0200 Message-ID: References: <87v81u85hv.fsf@localhost> <868qynipph.fsf@gnu.org> <87wmm75xze.fsf@localhost> <7YYJyDLCuZhtkTAT_ry6S14y4KoAJtsV_2Ui8Dsy37afuN1zucoO6VPh6YAvKQCs-0OUP3-rTFogtJBLrv2wiZ9rq6lacV-p_M1qsSSgKOk=@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38691"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Ihor Radchenko , Eli Zaretskii , monnier@iro.umontreal.ca, emacs-devel@gnu.org, eller.helmut@gmail.com To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 30 15:15:37 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 1sNuP3-0009vG-ML for ged-emacs-devel@m.gmane-mx.org; Sun, 30 Jun 2024 15:15:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNuOo-00055L-JU; Sun, 30 Jun 2024 09:15:22 -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 1sNuOj-000551-Ki for emacs-devel@gnu.org; Sun, 30 Jun 2024 09:15:19 -0400 Original-Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sNuOY-0006Es-Og; Sun, 30 Jun 2024 09:15:15 -0400 Original-Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-584ef6c07c2so4687609a12.1; Sun, 30 Jun 2024 06:15:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719753305; x=1720358105; 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=vmdcuAWb+gRicL3yzEzIw1As6HxR8ek+Lh/qGRgZSec=; b=cu2au9JwMa2VLZ5WhgL4HG6MeYAQvh6GGSBng8D76oYsU5voajfgyEsLi/DN0GBKOM YoGtPnABTZyJHmqCWn3HiRlyndm/DYYRBz9D7NYJduZlz30DaFH8imXKDo3w6mTBhC+O suTpW//p1L4JJaSzOVKzR2MjBl8RmiYSO3vcqhVUhBmnLGR+ETvtCldokTEq1azd5THk rWEHAAuyOV8hXWiNiaKTunLe6c0yUmiIwRd2b9vAgwtysEEYKQKsWlSftvnvDnMZse09 m4LRzhPbfhPPjAKxoqNR50znU5Li4+nlspbquw4qEV043fFcqiyX888kuSorzRQWh9zx g5QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719753305; x=1720358105; 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=vmdcuAWb+gRicL3yzEzIw1As6HxR8ek+Lh/qGRgZSec=; b=ds8lEFs+ayamCUfHtqfGAYzgaQDhbWV8ME4Pynvn/nin8/Tj93tNkYCwnZk/6KRIgN ipF6CSRCJHRGL5voKszXfUC61v70+MJEgyNrpBmExsYvbNLz/MhEDJJREGs/4yfBYFMm nWeCGax3Zo7IUKN9I7SXfyPsEBYn9fM4dTL1kVQWMRu2lkuacF8AhcAMoNIqnvpCMnkY H7w5yVin9yZE2asviVEc8DIk7QWrukJh+vI49YVLttF43HkFvfDfklLbpUhDoelYAICY iAEDIzjWSjpWA4jVoy6LusVgO8vWG0GOtyaQyUB7Gq19gifqfNcb/5r9+blCO3M77yWp U8wg== X-Forwarded-Encrypted: i=1; AJvYcCU0h9uDJkyZd1HtzsEphsmP8qsFjZZmZdgb3rwww6UGhTsksTkZQAEJBLCmW1bCA63O0lARL53xmz5laK6o2a8V8yVFux6ApRyb6WBj8aKwgZA= X-Gm-Message-State: AOJu0YyjbWHPlZAMbLu64RwrfMfT1dIStD7gypuwcuRCKsIFbCnf1Pkd aRQI67yMeu31UoCo/Q8U4ALIsvqKyFHjJDOKksfZuq7MKJ9ri0ZJ X-Google-Smtp-Source: AGHT+IGk10kDmr6W7JWAC7Iq744/OPrr+AXmFGzojqznUygterELlCak2t7O0sHomu7fYYZNrRJNIA== X-Received: by 2002:a17:906:e8f:b0:a72:58c3:2696 with SMTP id a640c23a62f3a-a751388eee6mr252521366b.14.1719753304586; Sun, 30 Jun 2024 06:15:04 -0700 (PDT) Original-Received: from pro2.fritz.box (pd9e36a45.dip0.t-ipconnect.de. [217.227.106.69]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72ab0657a6sm241603766b.129.2024.06.30.06.15.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jun 2024 06:15:04 -0700 (PDT) In-Reply-To: (Pip Cet's message of "Sun, 30 Jun 2024 12:54:42 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x530.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, 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:320966 Archived-At: Pip Cet writes: >> True. I forgot to mention an important thing: When something is splat, >> set flag(s) in the dependent hash table indicating that something must >> be done because of that splatting. In gethash and so, check the flag and >> do what's necessary. (I did something similar for the weak hash tables >> in CMUCL, and it wasn't entirely bad. And weak tables should be rare.) > > Not necessarily rare, particularly not if we turn BUF_MARKERS into a > weak hash table (I still don't see why we shouldn't do that, maybe I > missed it). Hm, don't know. On the one hand, there's Stefan's gap buffer data structure, and on the other hand add_marker and remove_marker are now O(1) in igc, modulo bugs. So the pressure has decreased. > > But, yes, that's a good idea and requires far fewer changes to the > hash table code than I've now made locally. However, I've decided to > go through with it and have just successfully splatted my first weak > hash table entry. Congrats! :-). I have to say, my ideas are idle musings, that I'll probably never realize. Working code wins :-). > If we go with my original proposal (which I'm not at all sure about at > this point as the code is really ugly), we'd have to have something > like: > > struct Lisp_Weak_Hash_Table > { > union vectorlike_header header; > > struct Lisp_Weak_Hash_Table_Strong_Part *strong; > struct Lisp_Weak_Hash_Table_Weak_Part *weak; > }; Thanks, I think I got it now. I lost context.