Why Pascal/Delphi could be better than C for Graphics.

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.