From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Emacs design and architecture. How about copy-on-write? Date: Wed, 20 Sep 2023 15:35:12 +0300 Message-ID: <83r0mtaupr.fsf@gnu.org> References: <83edizjn0v.fsf@gnu.org> <0518f65b-1dd1-6923-8497-da4d3aeac631@gutov.dev> <87sf7fc7kd.fsf@dataswamp.org> <834jjuk68t.fsf@gnu.org> <87cyyhc7uu.fsf@dataswamp.org> <83ttrsg9nx.fsf@gnu.org> <83h6nrg4eg.fsf@gnu.org> <83v8c7elan.fsf@gnu.org> <877conk5ny.fsf@localhost> <83ttrreeu0.fsf@gnu.org> <87bkdzeas1.fsf@localhost> <83cyyfe5l8.fsf@gnu.org> <8734zbyu6o.fsf@dataswamp.org> <835y46e8o9.fsf@gnu.org> <87zg1ixvnc.fsf@dataswamp.org> <83sf7acp86.fsf@gnu.org> <87led2x8ao.fsf@dataswamp.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23462"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Emanuel Berg Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 20 14:36:12 2023 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 1qiwRA-0005qs-4o for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Sep 2023 14:36:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qiwQU-0004jk-Vq; Wed, 20 Sep 2023 08:35:31 -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 1qiwQQ-0004j7-SZ for emacs-devel@gnu.org; Wed, 20 Sep 2023 08:35:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qiwQP-0001JC-5e; Wed, 20 Sep 2023 08:35:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=qZ7RU0CIbTYHgmnz0wwytp6wjtjRw6noKnbwZJeeIzE=; b=UwOhnkH0pB+z 2YKOL1OkLmFgJOyUYCKshY4ayOwXYGI95BinvQTs4Vuu6xNxQM4ImFMq66hvfWQ/P04beovSQbdQC wAgVIWQQtcTt1hx04DjWN6Yz8b2ITVYasU6nrcyCYFuNIJtGCuQkjRXcayEJ/PVqeWehRj2N8TdCx 3S9ZrjqSwU4AkCR8B/6coNJV2xIeD2upmZhXkHBPmvZo7sOH/gGCeljPUyp11UdJ934hNa22GcA3Y Wm3v9QBF72lur8hhQMvOLH6InqJBv6XnlQiKWQXLX2xkg5jdQ/Ux0qXprvyXK58Ji1Vxatlz2NWfX 0CPXWozjCk2KSIWKB0dSIw==; In-Reply-To: <87led2x8ao.fsf@dataswamp.org> (message from Emanuel Berg on Tue, 19 Sep 2023 21:38:39 +0200) 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:310833 Archived-At: > From: Emanuel Berg > Date: Tue, 19 Sep 2023 21:38:39 +0200 > > Eli Zaretskii wrote: > > > If we need to lock 99.99% of Emacs "single" variables, it is > > easier to lock everything. Faster, too. > > Why do we need to do that? > > For one thread, one write operation, and one variable, only > that variable has to be locked? > > (operate-on var1) ; here we need a lock on var1 > (operate-on var2) ; etc We don't have 'operate' in Emacs, but we do have setq, setf, and others. Where do you locak and where do you unlock in that case? Just try to write a simplest Lisp program, and you will see the problem.