Execution Speed

View: New views
6 Messages — Rating Filter:   Alert me  

Execution Speed

by roger_p :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have been experiencing a sudden slowdown in SableCC.  My language has been growing in complexity, so I am not surprised that it is  taking longer to process the syntax and generate a parser.  However, it has suddenly jumped with the last few changes from a 45minute time on a windows pc to over 6 hours!  I noticed that it is consuming about 3gig of memory ... so it could be that it is simply windows running out of memory and the page swapping killing me, or is there some limit/design issue in Sable that would lead to a sudden, dramatic increase in the running time as I add more alternatives, etc.

Thanks!

--
Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com!


_______________________________________________
SableCC-Discussion mailing list
SableCC-Discussion@...
http://lists.sablecc.org/listinfo/sablecc-discussion

Re: Execution Speed

by Etienne M. Gagnon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Roger,

The performance of any Java program drops dramatically as soon as the
Java virtual machine (jvm) causes memory swapping. There's no artificial
barrier where SableCC's performance drop.

You might want to look into your jvm's garbage collection options and
see if you can tune it to behave better when swapping memory. This is a
sticky issue for all garbage collected languages.

Etienne
PS: The unhelpful answer would be "add more ram to your pc"... :)

Roger Pomeroy a écrit :
> I have been experiencing a sudden slowdown in SableCC.  My language has been growing in complexity, so I am not surprised that it is  taking longer to process the syntax and generate a parser.  However, it has suddenly jumped with the last few changes from a 45minute time on a windows pc to over 6 hours!  I noticed that it is consuming about 3gig of memory ... so it could be that it is simply windows running out of memory and the page swapping killing me, or is there some limit/design issue in Sable that would lead to a sudden, dramatic increase in the running time as I add more alternatives, etc.
>
> Thanks!
>
>  

--
Etienne M. Gagnon, Ph.D.
SableCC:                                            http://sablecc.org


_______________________________________________
SableCC-Discussion mailing list
SableCC-Discussion@...
http://lists.sablecc.org/listinfo/sablecc-discussion

RE: Execution Speed

by Christopher Van Kirk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you're running a 32 bit version of Windows then 3gb is probably going to
cause you to disk swap. My recollection is that 3gb is the maximum
addressable ram on Windows, and some portion of that limit is reserved by
your graphics adapter (e.g. if your video card has 256mb ram, then your
non-graphics memory limit is 2.75gb).

Why is so much ram being taken up? Can you not break your AST's down into
smaller chunks and work on them individually?

-----Original Message-----
From:
sablecc-discussion-bounces+chris.vankirk=fdcjapan.com@...
[mailto:sablecc-discussion-bounces+chris.vankirk=fdcjapan.com@....
org] On Behalf Of Roger Pomeroy
Sent: Sunday, August 09, 2009 1:41 PM
To: sablecc-discussion@...
Subject: Execution Speed

I have been experiencing a sudden slowdown in SableCC.  My language has been
growing in complexity, so I am not surprised that it is  taking longer to
process the syntax and generate a parser.  However, it has suddenly jumped
with the last few changes from a 45minute time on a windows pc to over 6
hours!  I noticed that it is consuming about 3gig of memory ... so it could
be that it is simply windows running out of memory and the page swapping
killing me, or is there some limit/design issue in Sable that would lead to
a sudden, dramatic increase in the running time as I add more alternatives,
etc.

Thanks!

--
Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com!


_______________________________________________
SableCC-Discussion mailing list
SableCC-Discussion@...
http://lists.sablecc.org/listinfo/sablecc-discussion


_______________________________________________
SableCC-Discussion mailing list
SableCC-Discussion@...
http://lists.sablecc.org/listinfo/sablecc-discussion

Re: Execution Speed

by Rowan Worth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 If I'm reading correctly there are no ASTs involved yet - this is
still in parser generation. I must say the Roger has incredible
patience - the only time SableCC has taken more than about 3 minutes
to generate the parser for me was when I tickled something and put it
in an infinite loop...
-Rowan

On Mon, Aug 10, 2009 at 7:41 AM, Christopher Van
Kirk<chris.vankirk@...> wrote:

> Why is so much ram being taken up? Can you not break your AST's down into
> smaller chunks and work on them individually?
>
> -----Original Message-----
> From:
> sablecc-discussion-bounces+chris.vankirk=fdcjapan.com@...
> [mailto:sablecc-discussion-bounces+chris.vankirk=fdcjapan.com@....
> org] On Behalf Of Roger Pomeroy
> Sent: Sunday, August 09, 2009 1:41 PM
> To: sablecc-discussion@...
> Subject: Execution Speed
>
> I have been experiencing a sudden slowdown in SableCC.  My language has been
> growing in complexity, so I am not surprised that it is  taking longer to
> process the syntax and generate a parser.  However, it has suddenly jumped
> with the last few changes from a 45minute time on a windows pc to over 6
> hours!

_______________________________________________
SableCC-Discussion mailing list
SableCC-Discussion@...
http://lists.sablecc.org/listinfo/sablecc-discussion

Re: Execution Speed

by Etienne M. Gagnon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Rowan,

The LALR(1) tables computation algorithm has an exponential complexity worst case. I have seen over 60 minutes computation for big grammars. (I've got a colleague that keeps asking me for SableCC 4 because he has to deal with such a grammar...)

I guess that Christopher meant "... break your grammar into smaller chunks...".  Depending on the type of grammar, that could work. E.g. use a simpler grammar to do a first "high level parsing", then use additional parsers and/or manual tree transformations, to further develop the AST.

Have fun!

Etienne

Rowan Worth a écrit :
 If I'm reading correctly there are no ASTs involved yet - this is
still in parser generation. I must say the Roger has incredible
patience - the only time SableCC has taken more than about 3 minutes
to generate the parser for me was when I tickled something and put it
in an infinite loop...
-Rowan

On Mon, Aug 10, 2009 at 7:41 AM, Christopher Van
Kirkchris.vankirk@... wrote:
  
Why is so much ram being taken up? Can you not break your AST's down into
smaller chunks and work on them individually?
    

-- 
Etienne M. Gagnon, Ph.D.
SableCC:                                            http://sablecc.org

_______________________________________________
SableCC-Discussion mailing list
SableCC-Discussion@...
http://lists.sablecc.org/listinfo/sablecc-discussion

RE: Execution Speed

by Christopher Van Kirk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Yes, that’s what I meant. Sorry, I’m not so good with languages ;)

 

 

 

-----Original Message-----
From: sablecc-discussion-bounces+chris.vankirk=fdcjapan.com@... [mailto:sablecc-discussion-bounces+chris.vankirk=fdcjapan.com@...] On Behalf Of Etienne M. Gagnon
Sent: Monday, August 10, 2009 11:43 PM
To: Discussion mailing list for the SableCC project
Subject: Re: Execution Speed

 

Hi Rowan,

The LALR(1) tables computation algorithm has an exponential complexity worst case. I have seen over 60 minutes computation for big grammars. (I've got a colleague that keeps asking me for SableCC 4 because he has to deal with such a grammar...)

I guess that Christopher meant "... break your grammar into smaller chunks...".  Depending on the type of grammar, that could work. E.g. use a simpler grammar to do a first "high level parsing", then use additional parsers and/or manual tree transformations, to further develop the AST.

Have fun!

Etienne

Rowan Worth a écrit :

 If I'm reading correctly there are no ASTs involved yet - this is
still in parser generation. I must say the Roger has incredible
patience - the only time SableCC has taken more than about 3 minutes
to generate the parser for me was when I tickled something and put it
in an infinite loop...
-Rowan
 
On Mon, Aug 10, 2009 at 7:41 AM, Christopher Van
Kirkchris.vankirk@... wrote:
  
Why is so much ram being taken up? Can you not break your AST's down into
smaller chunks and work on them individually?
    



-- 
Etienne M. Gagnon, Ph.D.
SableCC:                                            http://sablecc.org

_______________________________________________
SableCC-Discussion mailing list
SableCC-Discussion@...
http://lists.sablecc.org/listinfo/sablecc-discussion