Tokenizing D at compile time?

Don nospam at nospam.com
Sat Aug 27 02:37:33 PDT 2011


dsimcha wrote:
> == 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.

Totally. Anything below BLAS3 is memory-limited, not CPU limited. Even 
then, cache prefetching has as big an impact as number of processors.


More information about the Digitalmars-d mailing list