census-instrumentation / opencensus-csharp

Distributed tracing and stats collecting framework
https://opencensus.io
Apache License 2.0
139 stars 32 forks source link

Make byte array ToString efficient #53

Closed lmolkova closed 5 years ago

lmolkova commented 6 years ago

ByteToHexCharArray seems to be extremely inefficient with all allocations it does. Here is a wonderful perf analysis comparison for different algos to convert byte array to string https://stackoverflow.com/questions/311165/how-do-you-convert-a-byte-array-to-a-hexadecimal-string-and-vice-versa

we should do this: https://stackoverflow.com/questions/311165/how-do-you-convert-a-byte-array-to-a-hexadecimal-string-and-vice-versa/24343727#24343727

lmolkova commented 5 years ago

Another good option is Guid.NewGuid().ToString("n")

miknoj commented 5 years ago

Hello, if no one has picked up this issue for the hackathon, I would love to work on this for my first issue!