A idea to improve diet-ng compile speed!

workman workman at gmail.com
Thu Aug 12 07:55:08 UTC 2021


diet-ng is great and I love to use it,  but it is too slow to 
compile.

One idea to speedup is use preprocessor like DMD compile C header 
file with GCC -E.

A diet-ng compiler write in D, translate template file into D 
source code, then mixin from projects.  A runtime diet-ng 
compiler will easaly speed up 1000 times compare to CTFE version, 
and you don't get any performance loss.

A runtime diet-ng compiler also possible compile template into 
dynamic library file,   you edit view files and a file monitor 
will recompile the dynamic library then http server reload it, no 
need recompile full projects.

Add new feature into diet will be more easy, since developer 
don't limit to use CTFE code.

D CTFE is great, but not suit for task like dieg-ng.








More information about the Digitalmars-d mailing list