I played with .NET profiling API (ICorProfilerCallback) and quickly discovered that FunctionID is not stable (it may be reused, see http://msdn.microsoft.com/en-us/library/bb384619.aspx). That's all fine. I came up with the idea to encode a method with the module version ID (MVID) and the method token (mdTokenDef).
However, I am concerned that this is space ineffective (16 bytes for the GUID + 4 bytes for the token). Right now I consider to use some sort of hash (32bit hash should be enough I think).
What do you think, are there better ways to encode a method?