February 02, 2007 Re: D has now surpassed C++ in overall performance | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> John wrote:
>> This change came about with the upgrade to 1.004 from 1.000
> > (I'm guessing because of the new GC).
>
> The NRVO has a significant effect, as well as the tail recursion optimizations added.
Great job on the optimizations!
C++ users have even less of an argument for using the language. A couple of cases even shows that the GC (which is the common complaint) performs better then C++ for those particular programs.
-Joel
|
February 02, 2007 Re: D has now surpassed C++ in overall performance | ||||
---|---|---|---|---|
| ||||
Posted in reply to Knud Soerensen | Knud Soerensen wrote: > I remember a while back I notice that there is a speed difference between using x<y ? a:b; and using if (x<y) a; else b; maybe they are not optimized the same way ??? > > Knud I tested both, and it seemed that the ternary operator (?:) was a bit slower than the if/else. I just ran the recursive benchmark a few times, and using the ternary operator resulted in about 0.3 seconds slower run times (about 5.0 seconds versus about 5.3 seconds). -- Remove ".doesnotlike.spam" from the mail address. |
February 04, 2007 Re: D has now surpassed C++ in overall performance | ||||
---|---|---|---|---|
| ||||
Posted in reply to John | John wrote:
> janderson Wrote:
>> John wrote:
>>
>>> D has now surpassed C++ in overall performance at the "Computer
>>> Language Shootout" website. This change came about with the
>>> upgrade to 1.004 from 1.000 (I'm guessing because of the new GC).
>>>
>>> http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all&calc=Calculate&xfullcpu=1&xmem=1&xloc=0&binarytrees=1&chameneos=1&message=1&fannkuch=1&fasta=1&knucleotide=1&mandelbrot=1&meteor=0&nbody=1&nsieve=1&nsievebits=1&partialsums=1&pidigits=1&recursive=1®exdna=1&revcomp=1&spectralnorm=1&hello=0&sumcol=1
>>
>> Only if you take memory into account. CPU performance is still not
>> up to par.
>>
>> The recursive and the mandelbrot are the biggest performance
>> eaters. Recursive is the same as gcc so it must be a compiler thing
>> I guess.
>>
> Yeah, I would really like to see GDC added but they said it would be
> "too difficult" to install.
Now this _is_ to worry about.
The Shootout guys never purported to be Universal Gurus, but they're sure as heck no first-timers either. And if that kind of folks are, er, un-eager to install GDC, then something really ought to change.
And before anybody pushes the Reply button, I've got things:
- I know from beforehand what some Nordic Guys would say -- so don't.
- Yes, there are RPMs for a gazillion Linux versions (sorry, Richard (M.S.) hit me with a memory stick: I mean _GNU_ [whatever] Versions) (( who said communism excludes imperialism???)), and there are other ready-to-use packages for other Linuxes, and even source distros. And (this really being the point: ) whatever we have or don't have, is secondary to the "user experience". Meaning, if folks perceive this as "difficult", then
- I've always felt embarrassed because I felt "it too difficult to bother". I'm starting to suspect I'm not alone, alone, alone......
- Some (most?) of those who have GDC installed (and the next version installed and t.n.v. installed...), have probably gotten so used to the install procedure that they actually don't perceive it as cumbersome and/or difficult anymore. (You only count if you've got your GCC intact and usable at will!)
I've nothing against GDC, its installing procedure or anything. My point is only that people who are used to it may not anymore be in a position to appreciate how daunting a ( _GDC_ ) newcomer (as opposed to D newcomer in general) might perceive the job of (finding out the procedure in the first place, and) downloading the appropriate file(s), checking out (from some authority on GDC stuff) whether ( /this/ ) GDC will fu... crap up their ( /this/ ) GCC installation (and if so, should they consider this as a once-only inconvenience or prepare for it as a fact of life?), etc, etc...
|
Copyright © 1999-2021 by the D Language Foundation