On Tue, Jun 17, 2014 at 09:36:09PM +1000, Manu via Digitalmars-d wrote:
> On 17 June 2014 18:18, Walter Bright via Digitalmars-d
> <digitalmars-d@puremagic.com> wrote:
> > On 6/16/2014 10:02 PM, Manu via Digitalmars-d wrote:
> >
> >> I can't imagine exceptions would appear in hot code very
> >> often/ever?
> >
> >
> > I've tried to explain this to you for months. You don't believe my
> > explanations, we just go round in circles. I strongly suggest you
> > write some code with shared_ptr<T> and try it out. Disassemble the
> > result. Benchmark it. Use Microsoft C++, so I won't be sabotaging
> > your results and it won't be because I write crappy compilers :-)
> 
> ARC is useless without compiler support. If we can't experiment with
> the compiler's ability to eliminate redundant RC related work, then we
> aren't 'experimenting' with anything of interest.
> We agree ARC isn't acceptable without compiler support. That's never
> been on debate.
> I have no way of testing whether the compiler is able to produce
> acceptable results in C or D today. shared_ptr will demonstrate what
> we already know is not acceptable, not whether the results of compiler
> support for RC optimisation is satisfactory.
> 
> I believe your explanations, but that's not where I'm hung up. In most
> cases I can visualise, there is significant opportunity for the
> compiler to eliminate redundant work, and in the remaining cases, I
> can imagine numerous very simple approaches to remove the bumps from
> hot code without interfering very much at all.
[...]

Perhaps the way to convince Walter, is to fork dmd on github, check it
out, and implement ARC in your fork (to whatever extent is necessary for
a first, possibly very crude, demonstration)? It doesn't have to work
100%, it doesn't even have to pass the test suite or compile the full D
language, it just has to do enough to prove that the compiler is capable
of automatically making performance-critical ARC optimizations on
whatever benchmark you choose to use.

This would add a lot of substance to all the hot air we've been pumping
at each other every time a GC/ARC-related thread comes up.


T

-- 
If it's green, it's biology, If it stinks, it's chemistry, If it has numbers 
it's math, If it doesn't work, it's technology.

Reply via email to