Best interface for memcpy() (and the string.h family of functions)

Stefanos Baziotis sdi1600105 at di.uoa.gr
Wed May 29 18:04:07 UTC 2019


On Wednesday, 29 May 2019 at 18:00:57 UTC, Jonathan Marler wrote:
>
> It doesn't make a difference whether the final memcpy is 
> `void*` or `byte*`.

Yes.

> The point is that it's one function, not a template, and you 
> might as well use the same type that the real memcpy uses so 
> you don't change the signature when you're not using libc.
>

This is what will prevent doing anything really useful in D.
This is what I meant that to have that, you have to implement
the D version of libc memcpy.

>
> You don't want to inline the memcpy implementation.  What makes 
> you think that would be faster?

CTFE / introspection I hope and currently, benchmarks.


More information about the Digitalmars-d mailing list