Tokenizing D at compile time?

dsimcha dsimcha at yahoo.com
Fri Aug 26 10:08:00 PDT 2011


== Quote from Rainer Schuetze (r.sagitario at gmx.de)'s article
> The lexer used by Visual D is also CTFE capable:
> http://www.dsource.org/projects/visuald/browser/trunk/vdc/lexer.d
> As Timon pointed out, it will separate into D tokens, not the more
> combined elements in your array.
> Here's my small CTFE test:

Thanks, but I've come to the conclusion that this lexer is way too big a
dependency for something as small as parallel array ops, unless it were to be
integrated into Phobos by itself.  I'll just stick with the ugly syntax.
Unfortunately, according to my benchmarks array ops may be so memory
bandwidth-bound that parallelization doesn't yield very good speedups anyhow.


More information about the Digitalmars-d mailing list