I can see in the FSharp.Core source code, that their library functions often call Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked count
to create a zero initialized array. In order to do some performance comparisons with the core libraries I would like to do the same, but it is a private method that I can't seem to access. I can see the definition of the function is:
let inline zeroCreateUnchecked (count:int) =
(# "newarr !0" type ('T) count : 'T array #)
But that doesn't appear to be valid in a normal F# program either. Is there a way to make this work?