John Tobey wrote:
> 
> On Thu, Nov 01, 2001 at 01:03:52AM -0500, Greg London wrote:
> > think I'm gonna have to stay with arrays.
> >
> > side note: 400 thousand method calls
> > totals to about 0.7 seconds of overhead.
> 
> Out of how many seconds?  Not 0.7 seconds per second, I hope. ;)

it takes about 8 to 9 seconds total time
to parse a bit over 6 thousand lines of verilog.

so, method calls are about... 10% ...
of the total time.

I did a benchmark calling an almost empty method
call 400k times, got 0.7 seconds. did the same
with a subroutine call, got 0.6 seconds,
so converting to subroutine calls doesn't look
like it will save me much.

thinking about it this morning, 
as a rule is called, it pushes partial results onto an array.
if the rule fails, it pops that information off the array,
and onto a 'scrapheap' array.

so, I'm starting to think the next major improvement would be
to add some kind of lookahead capability so that when I call
a rule, it will more than likely succeed.

rather than simply trying it, and then finding out it was
a waste fo time, a waste of a subroutine call, and a waste
of array pushing/popping.

I need a 'lookahead' feature to my parser.

will have to add it when I get time.  

Greg

Reply via email to