Best interface for memcpy() (and the string.h family of functions)
welkam
wwwelkam at gmail.com
Wed May 29 20:51:05 UTC 2019
On Wednesday, 29 May 2019 at 18:14:11 UTC, Jonathan Marler wrote:
> and then forward to the real implementation
With D you can forward to best suiting implementation. What libc
does it performs various runtime checks in order to figure out
what is the best way of copying provided input. With D it should
be possible to make certain checks at compile time. Secondly C's
memcopy is a big function not because its best for performance
but because of convenience. With D we can have many smaller
functions and they would be selected by template magic.
More information about the Digitalmars-d
mailing list