On 12/9/06, Basile STARYNKEVITCH <[EMAIL PROTECTED]> wrote:
Le Fri, Dec 08, 2006 at 07:09:23PM -0500, Daniel Berlin écrivait/wrote:
> You see, we currently waste a lot of memory to avoid the fact that our
> GC is very slow.
> We still take it on the chin when it comes to locality. Previous
> things such as moving basic blocks from alloc_pools (which are
> contiguous) to gc'd space cost us 2-3% compilation time alone, because
> of how bad our GC places objects.
Even 25% of current GCC compilation time is a noise level to me. If I
achieve 1000% of current GCC -O3 compilation time, I will be very
proud of me. So I really do not care about 3%, and I thought that my
proposal won't cost a lot if it is not used (because if they are no
finalized object, GCC won't run much slower...).
>
That's great. If you want to make a compiler useless to almost
everyone, go for it. Do it on a branch, go wild. I'm sure there are
6 or 7 people in the world who will use it because it matters to them
that much.
However, you seem to be trying to propose a mechanism for the *mainline of gcc*.
If you want to get something into the *mainline of gcc*, you need to
be in touch with the concerns that people have about slowing down the
compiler 3%, because that is what our *mainline gcc* customers care
about.
> This just isn't that big a problem. If you want to associate these
> things with trees, put them in annotations, mark them GTY ((skip)) and
> explicitly manage their lifetime. It is highly unlikely that they are
> going to live for some indeterminate amount of time.
So basically you are suggesting me to add some kind of specific
garbage collection machinery within my pass. Could be ok, but painful.
This is what the entire rest of the compiler does. Seriously.
That's the whole point: *We don't keep things in GC if they have
determinate lifetimes, because our GC is too slow*.
If you want to implement finalizers on your branch, go for it. You
should just be aware you are going to run into a lot of resistance if
you ever try to submit these patches for mainline, because of speed
issues.
This may or may not matter for your project. From my perspective, and
probably the perspective of most people around here, if your code
isn't going to *eventually* (even years down the road) end up in
mainline, it's generally a waste of time and it won't garner community
support (because nobody will use it in production). Research for the
sake of research is great, don't get me wrong, but given the limited
amount of time most GCC developers have to spend, it means we each
pick and choose the projects we work on and try to help contribute to,
and most people contribute to projects that they see being
productionized in some short number of years. That said, it's your
time and money, you are free to do as you wish with it.