From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: [BDW-GC] "Inlined" storage; `scm_take_' functions Date: Wed, 09 Sep 2009 00:54:13 +0100 Message-ID: <874ordf0wq.fsf@arudy.ossau.uklinux.net> References: <874ornldw0.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1252454135 11593 80.91.229.12 (8 Sep 2009 23:55:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Sep 2009 23:55:35 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Sep 09 01:55:28 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MlAX2-0001Ni-0y for guile-devel@m.gmane.org; Wed, 09 Sep 2009 01:55:28 +0200 Original-Received: from localhost ([127.0.0.1]:42096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlAX1-00082h-IX for guile-devel@m.gmane.org; Tue, 08 Sep 2009 19:55:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlAWt-00080s-58 for guile-devel@gnu.org; Tue, 08 Sep 2009 19:55:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlAWo-0007zo-Jt for guile-devel@gnu.org; Tue, 08 Sep 2009 19:55:18 -0400 Original-Received: from [199.232.76.173] (port=35313 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlAWo-0007zl-4K for guile-devel@gnu.org; Tue, 08 Sep 2009 19:55:14 -0400 Original-Received: from mail3.uklinux.net ([80.84.72.33]:42897) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlAWm-0001ZT-0x; Tue, 08 Sep 2009 19:55:12 -0400 Original-Received: from arudy (host86-152-99-133.range86-152.btcentralplus.com [86.152.99.133]) by mail3.uklinux.net (Postfix) with ESMTP id 3C3961F6832; Wed, 9 Sep 2009 00:55:11 +0100 (BST) Original-Received: from arudy.ossau.uklinux.net (arudy [127.0.0.1]) by arudy (Postfix) with ESMTP id 9B98738023; Wed, 9 Sep 2009 00:54:13 +0100 (BST) In-Reply-To: <874ornldw0.fsf@gnu.org> ("Ludovic =?iso-8859-1?Q?Court=E8s?= =?iso-8859-1?Q?=22's?= message of "Tue\, 01 Sep 2009 02\:14\:39 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:9281 Archived-At: ludo@gnu.org (Ludovic Court=E8s) writes: > Hello! Hi! > Stringbufs and bytevectors are now always "inlined" in the BDW-GC > branch=A0[0,=A01], which means that there's no cell->buffer indirection, > which greatly simplifies code (it also takes less room and may slightly > improve performance). > > The `scm_take_' functions for strings/symbols/bytevectors are now > essentially aliases to the corresponding `scm_from_' because we cannot > advantageously reuse the provided storage. That seems a bit of a shame. (i.e. that we can't advantageously keep the caller's string or vector data) Did you consider the option of - always having an indirection from the stringbuf/bytevector object to the underlying data - optimizing the scm_from_... case by doing a single scm_gc_malloc_pointerless (), and making the "underlying data pointer" point into the same malloc'd block. The first point should allow a similar simplification of the code as you have in your commits - by not having to handle both the inline and indirected cases everywhere - but the indirection would allow us to keep meaningful scm_take_... functions. Neil