memcpy, memset, memcmp and friends in the D Runtime
John Colvin
john.loughran.colvin at gmail.com
Mon Apr 7 07:05:35 PDT 2014
On Monday, 7 April 2014 at 13:17:37 UTC, Orvid King wrote:
> I know that with DMD at least, memcpy, memset, and memcmp are
> all
> intrinsics, meaning the compiler emits their implementations
> directly,
> thus why there isn't a body for them in druntime.
>
> On 4/7/14, Mike <none at none.com> wrote:
>> On Monday, 7 April 2014 at 12:38:55 UTC, Steven Schveighoffer
>> wrote:
>>>
>>> I think using using D's safer syntax of
>>>
>>> a[] = b[]
>>>
>>> and
>>>
>>> a[] = 0;
>>>
>>> Is much preferable to using memcpy/memset directly.
>>>
>>> They should do the "Right Thing", including calling
>>> memcpy/memset when correct.
>>>
>>
>> Oh! that is SO much better. I should have known. Thank you.
What's this for then?
https://github.com/D-Programming-Language/druntime/blob/master/src/rt/memset.d
More information about the Digitalmars-d
mailing list