Use SIMD to accelerate comment lexing

Manu via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 2 16:08:52 PDT 2015


On 3 June 2015 at 07:18, weaselcat via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On Tuesday, 2 June 2015 at 18:20:51 UTC, Jonathan M Davis wrote:
>>
>> On Tuesday, 2 June 2015 at 17:54:38 UTC, Iain Buclaw wrote:
>>>
>>> I was being deliberately quizzical because there are different takes on
>>> what you would call simd in the language, what set of types are available
>>> to you, what intrinsics are exposed (and how they are exposed), etc.
>>
>>
>> Well, Manu would know that a lot better than I would. I hadn't even heard
>> of SIMD before he got Walter to put it into the language, and I have yet to
>> use it, though I do think that I need to look into it at some point to see
>> where I could take advantage of it.
>>
>> - Jonathan M Davis
>
>
> D's simd library is difficult to use in comparison with gcc or clang's
> extensions to C/C++.
> bye,

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.

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.


More information about the Digitalmars-d mailing list