adam-dot-cohen / HyperSerializer

Dot Net Binary Serializer - 17x faster than Protobuf and Messagepack, 2x faster than MemoryPack
Apache License 2.0
64 stars 5 forks source link

Unnecessary new byte[] zeroing #3

Closed Nucs closed 1 year ago

Nucs commented 1 year ago

https://github.com/adam-dot-cohen/HyperSerializer/blob/42c6b1c1395539bc4d6d5b0c9a7267fa0e7bb136/HyperSerializer/HyperBinarySerializerExperimental.cs#L22 https://github.com/adam-dot-cohen/HyperSerializer/blob/42c6b1c1395539bc4d6d5b0c9a7267fa0e7bb136/HyperSerializer/HyperBinarySerializerExperimental.cs#L105

The mentioned lines can use (and potentially more) GC.AllocateUninitializedArray

adam-dot-cohen commented 1 year ago

HyperBinarySerializerExperimental is and internal class that isn't used for anything and isn't intended for end user consumption. Is there a reason you're trying to use this class?