Discussion:
Why Pascal/Delphi could be better for graphics than C/C++
(too old to reply)
Skybuck Flying
2013-08-06 22:49:03 UTC
Permalink
Hello,

I just posted this message on the nvidia developer forum.

However I think this posting could turn out to be particularly important in
the future:

This could be a very strong case to choose Pascal/Delphi over C or C++:

"
Hello,

Dynamically generating shaders and/or cuda kernels requires the handling of
large quantities of text.

Two cases come to mind:

1. Appending text to shaders/cuda kernels as functionality is added.

2. Compiling the shaders/cuda kernels.

I am not sure if Delphi is more suited for case 1. Delphi strings do work
via reallocating as needed. While C might allocate a larger buffer in
advance. Though C++ also has string support like Delphi, where the length of
a string is a 1 instruction operation (length-prefixes, length counted etc).

However for case 2 it would seem Pascal/Delphi is a better fit.
Pascal/Delphi compilers are known for their speed. While C/C++ compilers are
very slow.

The slowness of (CUDA) C/C++ compilers could stand in the away of some
interesting dynamic applications of CUDA and kernels.

Perhaps other solutions can be found. Perhaps contenating/appending PTX
directly instead of C or Pascal/Delphi.

(To be continued/evaluated...)

Bye,
Skybuck.
"

As dynamically created shaders and cuda kernels for graphics become more
populair programmers while flock to language which have fast compilers, thus
I recommend Pascal/Delphi compiler writes to jump onto the bandwagon... and
make sure that they have Compilers ready for when the storm begins ! ;) =D

Bye,
Skybuck.
l***@gmail.com
2013-08-27 08:13:35 UTC
Permalink
Pascal compilers are particularly fast because Pascal was designed to be easy to compile, with a syntax that allows a single pass and generally simple constructs and because popular ones (Borland) favour speed over optimization quality.

C++ compilers are particularly slow because they can be made to perform arbitrarily large and complex computations at compile time and because they usually compile very large source files (thanks to the preprocessor) with traditionally high-quality code generation and optimization.

GLSL compilers are neither Pascal nor C++ compilers and their implementation language has nothing to do with the size and complexity of their processing.
Loading...