guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: terribly complex syntax objects in syntax parse


From: Stefan Israelsson Tampe
Subject: Re: terribly complex syntax objects in syntax parse
Date: Tue, 15 May 2012 17:10:29 +0200

> 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 <address@hidden> wrote:
Hi Stefan,

Stefan Israelsson Tampe <address@hidden> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]