Andrei Alexandrescu Wrote:

> On 3/2/11 3:20 PM, Walter Bright wrote:
> > dsimcha wrote:
> >> == Quote from Walter Bright (newshou...@digitalmars.com)'s article
> >>> bearophile wrote:
> >>>> Bekenn:
> >>>>
> >>>>> The use of ref introduces a level of indirection.
> >>>> This is correct. But a minimally decent compiler must be able to
> >>>> remove this
> >>>> indirection where possible, like here, and produce efficient code.
> >>> Having the optimizer remove indirection is rarely possible in C or
> >>> C++, due to
> >>> aliasing.
> >>
> >> I'm sure there are tons of nitty-gritty details in implementing
> >> something like
> >> this properly, but **in principle**, can't the compiler put a runtime
> >> check in for
> >> aliasing and select the code path based on whether aliasing is present
> >> or not?
> >> Essentially, you'd have two generated functions, one that handles the
> >> aliasing
> >> case and one that handles the no-aliasing case.
> >
> > The check will cost you more than you win!
> 
> Often you stand to win a lot, albeit for simple functions (i.e. consider 
> memmove).
> 
> Andrei

What pisses me off is the Issac Guy doesn't want to support D in the great 
language benchmark. It's very important utlity for developers. Most coders with 
C and C++ mentality look the charts and only use the top-2 languages, that is C 
and C++. If D was there, we could get more users right now, because the 
optimization benefits make DMD the fastest. Probably even hundreds of 
enterprises go there to see what language to use. Everyone knows TIOBE is a 
joke, but this benchmark is probably the most important language benchmark in 
the web. D is not listed :-(

I've been donating few hundred bucks annually to wikipedia, but the deletionist 
news force me to rethink this. I could donate them to Issac if he just 
supported our language. Must not be that hard?

Reply via email to