D vs. C#

Bruce Adams tortoise_74 at yeah.who.co.uk
Wed Oct 24 23:55:36 PDT 2007


Robert Fraser Wrote:

> bearophile Wrote:
> 
> > Joel Lucsy Wrote:
> > > Oh? Since when? I know for a fact it doesn't, especially since MS has a 
> > > new library they are constructing for .Net 3.5.
> > 
> > I have done real tests of the nbody problem (from the Shootout site) of the C# code on an beta version of dotnet 3.0 and it runs almost two times faster than the D version (and the C++ version without parallel annotations), I have done those tests with a friend :-) I have seen with my eyes that it uses both cores of the CPU while running, while the D version uses one only. So maybe we are talking about a bit different things... There are many ways to mess things with quick tests, so I won't push this topic more :-) 
> > 
> > Bye,
> > bearophile
> 
> Indeed, automatic parallelization is a strong argument for VMs right >now, since it doesn't require code modification. At the conference, >Walter mentioned that D might be getting automatic parallelization of >pure functions, though. I'm just afraid this won't apply to member >functions, and since my programming style is so OO, it won't help me.

Why is that an argument for VMs? There's no reason a compiler backend can't write code that paralelises to multiple CPUs. M$ has a lot of money and bodies to through at the problem so its managed to get something up and running quickly. We open sourcers need to pull our fingers out and leverage our synergies. :)



More information about the Digitalmars-d mailing list