When using a Guid as an index for a Dictionary, is it better to use the Guid object, or the string representation of the Guid?
My first thought would have been, that Guid objects are faster, but if you get some input as string and have to search it in a small collection (hashset) of GUIDs (which aren't changing often), it might be faster to store them as strings, because:
For searching a string in a GUID-Dictionary, you have to parse the string (including error checking etc.), create the Guid structure, get the hash code, do the hash lookup and one final comparison of the GUID bytes.
For searching a string in a String-Dictionary, you have to build the hash of the string (possibly faster than building the Guid struct), lookup the hash and do one string comparison. If, for instance, you expect many GUIDs not to be in the collections, the hash comparison will fail often an you don't even have to do the string comparison (which takes slightly more time than the GUID-comparison from point 1 above)
If you already have Guid-structures as input (e.g. because you did some validity-checking on the input strings) of course it's far better to reuse them as index in the dictionary.
BUT: From point of view of design clarity (which is far more important than performance in 99% of all code) you should use Guid structures and only change that, if you really run into performance troubles (and profiling shows that you get an advantage out of the string solution).