is f# records is the same as .net struct? I saw people talk about f# struct,are they use this term interchangable with F# records? Like in FSharp runs my algorithm slower than P
To answer the second part of the question, it's really about using them as a dictionary key.
The speed of using something as a dictionary key comes down to how the GetHashCode function works for that type. For reference types such as Records, the default .Net behaviour uses Object.GetHashCode
which "computes the hash code based on the object's reference" which is an efficient numeric operation.
The more complex default behaviour for value types, which is what structs are is ValueType.GetHashCode
"method of the base class uses reflection to compute the hash code based on the values of the type's fields." so the more complex the struct and depending on its fields, computing the hash could take a lot longer.