From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#14599: An option to make vector allocation aligned Date: Thu, 13 Jun 2013 15:31:01 +0200 Message-ID: <874nd2gmsq.fsf@gnu.org> References: <51B87998.9060402@email.de> <87a9mvide2.fsf@gnu.org> <51B8E4B7.9060306@email.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1371130338 31031 80.91.229.3 (13 Jun 2013 13:32:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Jun 2013 13:32:18 +0000 (UTC) Cc: 14599@debbugs.gnu.org To: Jan Schukat Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Jun 13 15:32:18 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Un7dR-00054R-H5 for guile-bugs@m.gmane.org; Thu, 13 Jun 2013 15:32:17 +0200 Original-Received: from localhost ([::1]:53949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Un7dR-0000QO-54 for guile-bugs@m.gmane.org; Thu, 13 Jun 2013 09:32:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Un7dK-0000PQ-IM for bug-guile@gnu.org; Thu, 13 Jun 2013 09:32:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Un7dD-0004XQ-7L for bug-guile@gnu.org; Thu, 13 Jun 2013 09:32:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56437) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Un7dD-0004XM-3p for bug-guile@gnu.org; Thu, 13 Jun 2013 09:32:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Un7dC-0004uM-AP for bug-guile@gnu.org; Thu, 13 Jun 2013 09:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 13 Jun 2013 13:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14599 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 14599-submit@debbugs.gnu.org id=B14599.137113027018688 (code B ref 14599); Thu, 13 Jun 2013 13:32:02 +0000 Original-Received: (at 14599) by debbugs.gnu.org; 13 Jun 2013 13:31:10 +0000 Original-Received: from localhost ([127.0.0.1]:41102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Un7cL-0004rJ-Df for submit@debbugs.gnu.org; Thu, 13 Jun 2013 09:31:09 -0400 Original-Received: from hera.aquilenet.fr ([141.255.128.1]:48651) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Un7cH-0004r2-TK for 14599@debbugs.gnu.org; Thu, 13 Jun 2013 09:31:06 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 51D5AD51; Thu, 13 Jun 2013 15:31:02 +0200 (CEST) Original-Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BdbFYUQFFmhO; Thu, 13 Jun 2013 15:31:02 +0200 (CEST) Original-Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id C582BAEC; Thu, 13 Jun 2013 15:31:01 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 Prairial an 221 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <51B8E4B7.9060306@email.de> (Jan Schukat's message of "Wed, 12 Jun 2013 23:14:31 +0200") User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7173 Archived-At: Hi, Thanks for sharing your thoughts on this! Jan Schukat skribis: > Extending the programming api to support this is a bit more tricky. I > guess most straightforward and backward compatible would be to just at > a set of make-aligned-*vector and aligned-*vector and > *->aligned-*vector functions and their scm_* versions with an > additional alignment parameter. Optional alignment parameters on the > old functions could be nice too, but I guess that is just asking for > compatibility trouble. What about something like =E2=80=98make-aligned-bytevector=E2=80=99? This = should be enough, since bytevectors can be accessed through the SRFI-4 API (info "(guile) Bytevectors as Uniform Arrays"). (And it can already be implemented in Scheme, as I showed previously.) > The other question is the read syntax (one of the primary reasons I'm > doing all this). If alignment is something that should be preserved in > the permanent representation, you also need to store it in the flags, > since the content pointer can be aligned by coincidence. I haven't > looked at the compiling of bytevectors yet, to see if alignment can be > handled easily there. I agree that we=E2=80=99d need some sort of annotation to specify the align= ment of literals, but adding read syntax for that scares me somewhat. What do people think? On the compilation side, I think alignment will be more easily handled in 2.2 (current =E2=80=98master=E2=80=99), which uses ELF (think of GCC=E2= =80=99s =E2=80=98alignment=E2=80=99 attribute.) None of this really seems doable in the 2.0 stable series. So for now you=E2=80=99d have to resort to one of the options discussed. WDYT? Thanks, Ludo=E2=80=99.