From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.devel Subject: Re: terribly complex syntax objects in syntax parse Date: Tue, 15 May 2012 17:10:29 +0200 Message-ID: References: <877gwel8rx.fsf@netris.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=14dae9340715705e7004c0149ac8 X-Trace: dough.gmane.org 1337094656 26164 80.91.229.3 (15 May 2012 15:10:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 15 May 2012 15:10:56 +0000 (UTC) Cc: guile-devel To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue May 15 17:10:55 2012 Return-path: Envelope-to: guile-devel@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 1SUJOo-0007CA-GO for guile-devel@m.gmane.org; Tue, 15 May 2012 17:10:54 +0200 Original-Received: from localhost ([::1]:43546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUJOn-0006Si-RG for guile-devel@m.gmane.org; Tue, 15 May 2012 11:10:53 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUJOZ-0006LI-Gv for guile-devel@gnu.org; Tue, 15 May 2012 11:10:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUJOS-00082A-SI for guile-devel@gnu.org; Tue, 15 May 2012 11:10:39 -0400 Original-Received: from mail-we0-f169.google.com ([74.125.82.169]:48956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUJOS-000821-Dl for guile-devel@gnu.org; Tue, 15 May 2012 11:10:32 -0400 Original-Received: by wefh52 with SMTP id h52so3437658wef.0 for ; Tue, 15 May 2012 08:10:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=GSNq8mdWomDPH6fPQ11WIrpuDXzipiEiNZWPpEw/A/Y=; b=pu7DGBF3HXTozIOr445gQEJxn3ApzE1+pQArw7alwaWkORdksAESVwaxk6G3oPlZEK m8In+sAHI6a3ZRBM4KW4Ztlr+JyOpHo+sUkM3HKmdvgmmDI9WIxaIj72/7XkNb+FdcdF mjaaA2SJDZl1PPPZpUTf33ixN1KPc183aFWSctaYTTMlscWfcKLvTzsYR8PD7FB+8hr/ z2+HkNGEeGQ4yTv1wEOxkxsuNKe5yuwWoPmvcJ/E5q1DjmZlnDFbZHD38LB6qz2N1D9p ggnNW4o8IfzVwIspIzieOrPO+UkXBSTnfygRW5bhimn+UFK6Wqr0qFRuZ53iJ/JMI0CL XYGQ== Original-Received: by 10.50.197.200 with SMTP id iw8mr2674708igc.18.1337094629776; Tue, 15 May 2012 08:10:29 -0700 (PDT) Original-Received: by 10.50.242.102 with HTTP; Tue, 15 May 2012 08:10:29 -0700 (PDT) In-Reply-To: <877gwel8rx.fsf@netris.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:14434 Archived-At: --14dae9340715705e7004c0149ac8 Content-Type: text/plain; charset=ISO-8859-1 > I wish I had a better answer for you, but unfortunately these enormous > syntax-objects are a core part of the 'syntax-case' system. I see no > way to eliminate this bloat without moving to a different macro system. Hey one can do what one can do. 1000rows of scheme results currently in 500kB go file mainly due to these syntax objects. On the other hand does the compiler create object data intelligently making sure that eq? objects is created only once? hence a reuse of common subexpressions. That can compress the bloat a bit I suspect! /Stefan Anyway I think you mentioned you wanted a refisgn of the syn On Tue, May 15, 2012 at 12:04 AM, Mark H Weaver wrote: > Hi Stefan, > > Stefan Israelsson Tampe writes: > > syntax-parse is kind of heavy right now. The parser function produced > > are huge and the main reason > > is that the stored syntax objects are enormous. > > Yes, this is very unfortunate. These syntax-objects add a huge amount > of bloat to our entire system. The vast majority of each syntax-object > is used only if the syntax-object is passed as the first argument to > 'datum->syntax'. Of course, most syntax-objects are never passed to > 'datum->syntax', but unless the compiler can prove that this will never > happen, the bloat must be kept around. > > > I know that Mark Weaver had done something to make these creatures > > less fatty. > > I wrote a hack to minimize the size of syntax objects in psyntax-pp.scm. > However, the hack cannot safely be used in the general case. It is only > safe because I convinced myself and others that the syntax-objects > embedded within psyntax-pp.scm will never be passed to 'datum->syntax'. > > > The question is if there is anything a guile user can do? > > My hack cannot be used by users because it makes assumptions about the > internals of psyntax and of our compiler: assumptions that will > certainly to be violated in future versions of Guile. > > I wish I had a better answer for you, but unfortunately these enormous > syntax-objects are a core part of the 'syntax-case' system. I see no > way to eliminate this bloat without moving to a different macro system. > > Best, > Mark > --14dae9340715705e7004c0149ac8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable > I wish I had a better answer for you, but unfortunately these enormous=
> syntax-objects are a core part of the 'syntax-case' system= . =A0I see no
> way to eliminate this bloat without moving to a diffe= rent macro system.

Hey one can do what one can do. 1000rows of scheme results currently in=
500kB go file mainly due to these syntax objects. On the other hand doe= s
the compiler create object data intelligently making sure that eq? ob= jects is created only
once?=A0 hence a reuse of common subexpressions. That can compress the bloa= t
a bit I suspect!

/Stefan

Anyway I think you mentioned yo= u wanted a refisgn of the syn
On Tue, May 15,= 2012 at 12:04 AM, Mark H Weaver <mhw@netris.org> wrote:
Hi Stefan,

Stefan Israelsson Tampe <stef= an.itampe@gmail.com> writes:
> syntax-parse is kind of heavy right now. The parser function produced<= br> > are huge and the main reason
> is that the stored syntax objects are enormous.

Yes, this is very unfortunate. =A0These syntax-objects add a huge amo= unt
of bloat to our entire system. =A0The vast majority of each syntax-object is used only if the syntax-object is passed as the first argument to
'datum->syntax'. =A0Of course, most syntax-objects are never pas= sed to
'datum->syntax', but unless the compiler can prove that this wil= l never
happen, the bloat must be kept around.

> I know that Mark Weaver had done something to make these creatures
> less fatty.

I wrote a hack to minimize the size of syntax objects in psyntax-pp.s= cm.
However, the hack cannot safely be used in the general case. =A0It is only<= br> safe because I convinced myself and others that the syntax-objects
embedded within psyntax-pp.scm will never be passed to 'datum->synta= x'.

> The question is if there is anything a guile user can do?

My hack cannot be used by users because it makes assumptions about th= e
internals of psyntax and of our compiler: assumptions that will
certainly to be violated in future versions of Guile.

I wish I had a better answer for you, but unfortunately these enormous
syntax-objects are a core part of the 'syntax-case' system. =A0I se= e no
way to eliminate this bloat without moving to a different macro system.
=

=A0 =A0 Best,
=A0 =A0 =A0Mark

--14dae9340715705e7004c0149ac8--