chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Fix performance bottleneck in compiling la


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] Fix performance bottleneck in compiling large files, add profiling option
Date: Mon, 23 Jan 2012 09:09:56 +0100
User-agent: Mutt/1.4.2.3i

On Mon, Jan 23, 2012 at 05:47:55AM +0100, Felix wrote:
> > I think this option is generally useful since if the compiler reports
> > a procedure nesting depth of more than about 10, this rapidly becomes
> > useless to a user (it also reports procedure nesting when the
> > scrutinizer finds a possible type error).
> > 
> 
> Thanks for the patch and the investigation of this problem. I must
> say that I would find such an option rather obscure.

I considered that, but I think in some cases it would be useful to
be able to increase the limit, or remove it altogether.
Don't forget, it's not just the C comments but also the scrutinizer
messages that are affected by this option.

We could move the option to the "obscure options" section of the help :)

> Couldn't we simply
> do a cutoff, probably preserving starting and ending elements of the
> nesting list?, in other words:
> 
>   "FOO in BAR in ... in YES in NO in PERHAPS" ?
> 
> With (say) 10 elements at the front and the back this should be more
> than sufficient.

This could be done but I'm afraid that traversing all the way up the
tree also causes exponential cost.  A cutoff point ensures that there's
an upper bound for each item, and that upper bound can be seen as a
constant factor of the compilation as a whole.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth



reply via email to

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