Use SIMD to accelerate comment lexing

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 3 15:49:14 PDT 2015


On 6/2/2015 4:08 PM, Manu via Digitalmars-d wrote:
> I'll wear responsibility for this, but std.simd is proving really hard
> for me to finish.
> I think in order to get something in there to start with, I need to
> reduce the scope to the simplest bits, get them in, then build
> outwards.
> It's fairly large to cover everything I think is important, and
> there's a few tools missing still; I can't finish without some way to
> know the SIMD flags fed to the compiler from the command line (some
> standard versions?), and it's also difficult to resolve without
> forceinline of some sort. I've reached situations where the
> compiler(/s) just don't do what I want it to. Also, I think the stack
> of simd function influence the compilers inline heuristics, and even
> thought the compiler decides to inline simd functions, presence of
> many of them in an outer function seems to reduce the probability that
> the outer function will be inlined as it should. forceinline needs to
> be a hard statement to the compiler, and ideally, a forceinline call
> tree shouldn't improperly influence the compilers inline decisions for
> outer functions.

I suggest not worrying about forceinline for the moment, and just write the code 
as if it existed.


> As an aside, I need a test environment for each compiler, targetting
> x86, x64 and arm at least, where I can submit some code, and have it
> run the unittests on a matrix of appropriate targets. (ideally PPC and
> MIPS would also be included, so they can influence design decisions.)
> Does any such test system exist? A web service to provide this would
> be invaluable... I don't have all those systems available to me.

Just make it work on the machine you have, and prove it out on that machine. 
Then worry about porting it.



More information about the Digitalmars-d mailing list