Currenly to only way to get the value of a UID is to call .Bytes, but this allocates a new byte[] very time. That's a bit silly, as we store the value of this UID in the value field as a ulong.
This PR adds a ToUInt64 method, which gives direct access to the value of the UID. It gives a performance improvement in some scenarios in my application (because we avoid creating a byte[] which needs to be garbage collected).
Currenly to only way to get the value of a
UID
is to call.Bytes
, but this allocates a newbyte[]
very time. That's a bit silly, as we store the value of this UID in the value field as aulong
.This PR adds a
ToUInt64
method, which gives direct access to the value of the UID. It gives a performance improvement in some scenarios in my application (because we avoid creating abyte[]
which needs to be garbage collected).