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 21:22:44 +0200 Message-ID: References: <87v81u85hv.fsf@localhost> <87wmm75xze.fsf@localhost> <7YYJyDLCuZhtkTAT_ry6S14y4KoAJtsV_2Ui8Dsy37afuN1zucoO6VPh6YAvKQCs-0OUP3-rTFogtJBLrv2wiZ9rq6lacV-p_M1qsSSgKOk=@protonmail.com> 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="7442"; 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 21:24:03 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 1sO09b-0001if-A7 for ged-emacs-devel@m.gmane-mx.org; Sun, 30 Jun 2024 21:24:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sO08T-0001kj-8l; Sun, 30 Jun 2024 15:22:53 -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 1sO08S-0001ka-Aq for emacs-devel@gnu.org; Sun, 30 Jun 2024 15:22:52 -0400 Original-Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sO08Q-0004tz-6m; Sun, 30 Jun 2024 15:22:52 -0400 Original-Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-57d106e69a2so2311962a12.0; Sun, 30 Jun 2024 12:22:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719775366; x=1720380166; 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=uZbYV450OGvjoLjC4fqQV/Bsuf529YgbGcgTHA36J98=; b=ZU/MTtIXBI1DfKByF5XViyiwm9dvcbszXZWyqJMhNTosTuNVeOx2zDVhNvAh+1nqXk 2ZhL7koYGH6DSKnw/4izKuV5Gp/m4GnJX+spbFOEM2FLPj1Wip5tVri03UtS+w1igdno fHbBKytV5ZVhIwvtDwf5xmmULxu8s10hu+Bg4Tajpmwr2w5wQJjiI4AT9dcT6lkECZjg 6AH532eXnj+FX3lBNyOrb5d8jJIqLstRTA9shkF3bFbHqc3LRPGQmjynePxCyQ+kaCgl mSgeAiSNh0hu4N6DCqesMsPBmbXwTEjM0/egzZUFk1jFzivLA74YCrnixw/HgIrHGilf TDnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719775366; x=1720380166; 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=uZbYV450OGvjoLjC4fqQV/Bsuf529YgbGcgTHA36J98=; b=nZGllZlSohYQuZnl927/KX1nev0N7ddWUNyNIkBbt98C+qCCoghNieUgDuESaa3t0U e/QxiysXEyU5UHVU+Ur+eNHiJaiBwvQnqWe9djdgUVlB0+RA/KdSau7YFYS2wouSVGWB 7BMijy7n0HuTsovNX9FtUqFmhxUwCdQ6rQlxedNV3Zbw0XWgbjamaM7sKKjJfdKlLB6r zKX6ukKZHRCaz0EliqoozpxximAI7q2hAYPx5h47U46km6eYCY5Xve44lKnexSgolCSf /lax10P41ZiihHJmQercbiIpOGpyxEJIqis+eFJFFyaYB3+NPT5/WyCviRgiY5TzaT1w omAQ== X-Forwarded-Encrypted: i=1; AJvYcCX7gThT87hETQ+5HAWkY96BKvfL/Ita6tU00FqGKqLpDywQOlG5LoG1QdvMq73PgJkvipW+/dQFORJkNQBH/pe2qZJJtoBkza3Il20kkUqMtm0= X-Gm-Message-State: AOJu0YzHiVdPTnTrq6tlyUA+G1Z9GInmr6no64iyB7PiKdBr++5qWY3d Z0B16sujOTJjJm6jwCFRJNy206tC4YtG2FhYO1anklxYg7z31qNE X-Google-Smtp-Source: AGHT+IE9S++rHRoJgIpLDT+Pwp2q4T4ILoCK8bBjEXKbitElpwGFoNYvmSbsE56XJGp7BmuqG9hAEA== X-Received: by 2002:a05:6402:3595:b0:57c:70b4:7ac with SMTP id 4fb4d7f45d1cf-58781fa9794mr3251352a12.15.1719775366144; Sun, 30 Jun 2024 12:22:46 -0700 (PDT) Original-Received: from pro2.fritz.box (pd9e36a45.dip0.t-ipconnect.de. [217.227.106.69]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5861324f08esm3534604a12.27.2024.06.30.12.22.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jun 2024 12:22:45 -0700 (PDT) In-Reply-To: (Pip Cet's message of "Sun, 30 Jun 2024 19:02:07 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x534.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:320977 Archived-At: Pip Cet writes: > On Sunday, June 30th, 2024 at 13:15, Gerd M=C3=B6llmann wrote: >> Pip Cet pipcet@protonmail.com writes: >>=20 >> > > True. I forgot to mention an important thing: When something is spla= t, >> > > set flag(s) in the dependent hash table indicating that something mu= st >> > > 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 tabl= es >> > > in CMUCL, and it wasn't entirely bad. And weak tables should be rare= .) >> >=20 >> > 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). >>=20 >>=20 >> 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. > > Well, I needed a weak hash table to test things on, which is why I've > included the change in the attached patch. Thanks! What do youo think about making a patch containing only your weak hash tables, and leaving the BUF_MARKERS alone for now? That way igc could support the existing uses of weak hash tables (I remember one in the CLOS department somehwere), and they would be somewhat tested. Don't remember if we have unit tests for them.