I understand unsafe code is more appropriate to access things like the Windows API and do unsafe type castings than to write more performant code, but I would like to ask yo
In this response to an unrelated Stack Overflow article that has been viewed 881,000 times, benchmarks for various byte[] to hex string algorithms are shown.
The fastest is an unsafe implementation of the same safe code that holds the #2 spot. The unsafe is over twice as fast in this comparison.
The details of this algorithm are here.