From a C++/JS benchmark

Iain Buclaw ibuclaw at ubuntu.com
Sat Aug 6 12:57:44 PDT 2011


== Quote from bearophile (bearophileHUGS at lycos.com)'s article
> Iain Buclaw:
> Are you using GDC2-64 bit on Linux?

GDC2-32 bit on Linux.


> > Three things that helped improve performance in a minor way for me:
> > 1) using pointers over dynamic arrays. (5% speedup)
> > 2) removing the calls to CalVector4's constructor (5.7% speedup)
> > 3) using core.stdc.time over std.datetime. (1.6% speedup)
> >
> > Point one is pretty well known issue in D as far as I'm aware.
> Really? I don't remember discussions about it. What is its cause?

I can't remember the exact discussion, but it was something about a benchmark of
passing by value vs passing by ref vs passing by pointer.

> > Point two is not an issue with inlining (all methods are marked 'inline'), but it
> > did help remove quite a few movss instructions being emitted.
> This too is something worth fixing. Is this issue in Bugzilla already?

I don't think its an issue really. But of course, there is a difference between
what you say and what you mean with regards to the code here (that being, with the
first version, lots of temp vars get created and moved around the place).


Regards
Iain


More information about the Digitalmars-d mailing list