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?Ludovic_Court=C3=A8s?= Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: mmap for guile Date: Thu, 21 Jul 2022 11:14:44 +0200 Message-ID: <87ilnqn7y3.fsf@gnu.org> References: <56ee7537-1666-3d04-7093-732a75624e9b@gmail.com> <0cf4e4ee80169487694b844996e04f3293eab92f.camel@telenet.be> <87k08tfau0.fsf@gnu.org> <4c07ec35d773ecb8d4d7ea6687a4c11cd2a221b0.camel@telenet.be> 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="8506"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) Cc: guile-user@gnu.org, guile-devel@gnu.org To: Maxime Devos Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Thu Jul 21 11:15:29 2022 Return-path: Envelope-to: guile-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 1oESHI-0001wk-9l for guile-devel@m.gmane-mx.org; Thu, 21 Jul 2022 11:15:28 +0200 Original-Received: from localhost ([::1]:57154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oESHG-00017e-Tv for guile-devel@m.gmane-mx.org; Thu, 21 Jul 2022 05:15:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oESGd-0000nT-3Y; Thu, 21 Jul 2022 05:14:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48716) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oESGc-0004wZ-OC; Thu, 21 Jul 2022 05:14:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=iTZlnBxfa9lN3c71kjZd0szPu3OErw8bBAZPTxcbUcU=; b=itQIbGa9H0gt040oaW6p TFjiJ/lDJsW2ugQnetbPOti+Rw4CLrQQdoXHmXpSmhPYVHM1jx9LEZ6m3dr8c93uA9RNHbrmlAN8Y JqYGTq0v/1bh7K5c+yg4w43IzjcMX9aS+0BUGNvPSdoHFNkGhUgeLbAA1npsz7jJJXPsPQG+78Dts VCP3xOkUe/vV+urTooIIczws13gPVp08FmndxyLx2ab/MkMuf9lt4mtKGMVpq46wef0xFcxUHRvs9 MDCuXcr3vsS8U1UYZe+LuB6EIaXmGqL79iQN3p0aRYoX75GAdyoZWjgzRgeidFXn92LEivq/MTwJn iaXYjbh0m2Q5HA==; Original-Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=44060 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oESGc-0003E4-4r; Thu, 21 Jul 2022 05:14:46 -0400 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 3 Thermidor an 230 de la =?utf-8?Q?R=C3=A9volu?= =?utf-8?Q?tion=2C?= jour du Melon X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu In-Reply-To: <4c07ec35d773ecb8d4d7ea6687a4c11cd2a221b0.camel@telenet.be> (Maxime Devos's message of "Tue, 19 Jul 2022 15:20:56 +0200") X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:21261 gmane.lisp.guile.user:18441 Archived-At: Hi, Maxime Devos skribis: > Ludovic Court=C3=A8s schreef op ma 04-07-2022 om 12:09 [+0200]: >> I don=E2=80=99t think the optimizer makes any such assumption, except for >> literal bytevectors. > > It _does_ assume that bytevector lengths don't change: [...] > As can be seen in the above output, it first determines > the length of the bytevector and then compares it again the index > (for the index check) and then actually reads th byte > so it assumes that the length doesn't change in-between -- it's not an > atomic operation! Oh right. > Even if it didn't, being able to assume bytevector lengths don't change > is important for optimising code like (begin (bytevector-ref bv 9000) (by= tevector-ref 8999) ...)), > to optimise out many range checks, though I don't know if Guile currently > does that. Indeed. Ludo=E2=80=99.