Misc questions:- licensing, VC++ IDE compatible, GPGPU, LTCG, QT, SDL

%u twinbee42 at skytopia.com
Tue May 18 05:04:38 PDT 2010


Hi all, due to the slow speed of my browser and multiple posts, I'll be
posting just one email which covers everything. Please let me know if
replying to each individually is really preferred. Many thanks for all
and any help.


> May I ask you why are you planning to port an existing codebase to D?
> What kind of benefits specifically(except comparable to C performance)
> you expect from D?
>
> Thank you.

Sure. There's a couple of reasons really. First is that a lot of 'fluff' in
C is rectified in D so that declarations and header files are a thing of
the past. Hence less repetition and housekeeping.
Second reason is (and I know this might sound idealistic), it'd be nice
to promote D more, and get more people using it, since it is a step up
from a C in many regards.

My code is still fairly small (certainly less than 1 million lines :) ), so it
won't be too much hassle.

Walter said:

> It does not do link time code generation nor profile guided optimization,
> although in my experiments such features pay off only in a small minority of
> cases.

In VC++, PGO is a great speed help because of inlining, but from what you said
later, this doesn't seem to be so much of an issue with D as (like you said),
it has access to all the code anyway. I'm a little concerned though about the floating
point performance, as raytracing does quite a bit of this of course.

The DMC++ compiler you mentioned sounds interesting too. I'd like to compare
performance with that, the VC++ one, and the Intel compiler.

Thanks to Robert, for recommending VisualD and the bindings. I might try all
three D compilers to which gets the best speed, but perhaps LDC seems most
promising from what you've said. I suppose in the future when many-core becomes
prevalent that compiler optimization won't be so much of an issue because of
the relative simplicity compared to the tricks of the present day CPU.

One issue I have with the Visual C++ compiler is that it doesn't seem to support
loop unswitching (i.e. doubling up code with boolean If statements). I wonder if
one of the D compilers supports it. I started a thread over at cprogramming
about it here: http://cboard.cprogramming.com/c-programming/126756-lack-compiler-loop-optimization-loop-unswitching.html


> I have some decent CUDA bindings with a nice high level API that I'd be
> willing to share/open source. But you still have to write the actual GPU
> kernels in C/C++.

Thanks, I'll bear those in mind.

Cheers, Dan


More information about the Digitalmars-d mailing list