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
No, in fact, a record type in F# is a reference type just with special functional programming features like pattern matching on properties, easier immutability, and better type inference.
I think Laurent's speedup must have been for other reasons, because we can prove that Tup
is not a ValueType:
type Tup = {x: int; y: int}
typeof.BaseType = typeof //true
Whereas
type StructType = struct end
typeof.BaseType = typeof //true
typeof.BaseType = typeof //false