RFC: std.uuid

Piotr Szturmaj bncrbme at jadamspam.pl
Sat Dec 24 17:08:03 PST 2011


Vladimir Panteleev wrote:
> On Saturday, 24 December 2011 at 00:31:43 UTC, Piotr Szturmaj wrote:
>> Jonathan M Davis wrote:
>>> On Friday, December 23, 2011 23:09:32 Piotr Szturmaj wrote:
>>>> Johannes Pfau wrote:
>>>>> Related question to the SHA/MD5 hash functions: could those be pure?
>>>>
>>>> Weakly pure, yes - but for what?
>>>
>>> In general, if a function _can_ be pure, it _should_ be pure. If it
>>> can be and
>>> it isn't, it artificially restricts the types of functions which can
>>> call it.
>>
>> Yes, Johannes probably want to mark uuid hash gen as pure. I just
>> wanted to know if its something important as my code used memcpy which
>> is impure.
>
> Where does your code use memcpy? I see one mention in the comments, but
> none in the code.

See putArray() in base.d

> Anyway, I believe you can do without memcpy by using array copy? Array
> copy might even be faster, since memcpy is not a DMD compiler intrinsic
> like in many C/C++ compilers.

I converted memcpy calls to array copy but it become about 1 Mbps slower.


More information about the Digitalmars-d mailing list