core.traits?
Mike Franklin
slavo5150 at yahoo.com
Thu Jan 10 00:24:37 UTC 2019
On Wednesday, 9 January 2019 at 19:24:28 UTC, Jacob Carlborg
wrote:
>> Yes, it's possible, but I don't think it will ever be accepted
>> if it doesn't perform at least as well as the optimized
>> versions in C or assembly that use AVX512 or other SIMD
>> features. It needs to be at least as good as what libc
>> provides, so we need to be able to leverage these unique
>> hardware features to get the best performance.
>
> Perhaps it could be considered as a fallback when a "memcpy"
> isn't available.
I'm not sure what you mean. DMD currently links in libc, so
`memcpy` is always available.
Also, it's difficult for me to articulate, but we don't want
`void* memcpy(void* destination, const void* source, size_t num)`
rewritten in D. We need `void memcpy(T)(T* destination, const T*
source)` or some other strongly typed template like that. And as
an aside, thanks to https://github.com/dlang/dmd/pull/8504 we now
have to be careful about the order of arguments.
Anyway, I'm not sure there's much point in hashing this out right
now. We need dynamic stack allocation first before any of this
can happen because the runtime hooks need to be able to generate
dynamic assertion messages in -betterC, and there's only one
person I know of that can do that (Walter), and I don't think
it's a priority for him right now.
Mike
More information about the Digitalmars-d
mailing list