Skip to content

Instantly share code, notes, and snippets.

open BenchmarkDotNet.Attributes
open BenchmarkDotNet.Running
open System
open ExtCore.Control
[<MemoryDiagnoser>]
type Test() =
let choiceFun x y = x |> Choice.bind (fun _ -> y)
let resultFun x y = x |> Result.bind (fun _ -> y)
actor Ping
var _passes: U32
var _main: Main
new create(passes: U32, main: Main) =>
_passes = passes
_main = main
be ping(partner: Pong) =>
if (_passes > 0) then
let inline f x y = ()
[<EntryPoint>]
let main argv =
0
[F#][INFO 10:43:52 PM] ImplFile
(ParsedImplFileInput
("E:\github\ConsoleApplication89\ConsoleApplication89\Program.fs",false,
type A = { a1: int; a2: int; a3: int }
type B = { b1: int; b2: int; b3: int }
type C = { c1: int; c2: int; c3: int }
type T =
static member M(?a1: int, ?a2: int, ?a3: int,
?b1: int, ?b2: int, ?b3: int,
?c1: int, ?c2: int, ?c3: int) = ()
let a: A option = None
                  Method |    Size |             Mean |            Error |            StdDev |           Median | Scaled | ScaledSD |
------------------------ |-------- |-----------------:|-----------------:|------------------:|-----------------:|-------:|---------:|
           RefTupleArray |      10 |         853.9 ns |         2.849 ns |          2.665 ns |         853.5 ns |   1.00 |     0.00 |
    RefTupleArrayInPlace |      10 |         780.3 ns |         3.071 ns |          2.872 ns |         780.2 ns |   0.91 |     0.00 |
        StructTupleArray |      10 |         830.6 ns |         2.549 ns |          2.384 ns |         830.1 ns |   0.97 |     0.00 |
 StructTupleArrayInPlace |      10 |         673.4 ns |         1.996 ns |          1.867 ns |         673.1 ns |   0.79 |     0.00 |
           RefTupleArray |     100 |       9,475.0 ns |        32.206 ns |         30.125 ns |       9,475.0 ns |   1.00 |     0.00 |
    RefTupleArrayInPlace |     100 |       9,411.0 ns |        32.066 ns |        
type RefRecord = { I: int; J: int }
[<Struct>]
type StructRecord = { I: int; J: int }
type Benchmarks() =
let rnd = Random()
let next() = rnd.Next(Int32.MinValue, Int32.MaxValue)
let n = 10000
let refTupleList = List.init n (fun _ -> next(), next())
type RequestController(client: IRequestClient<CheckOrderStatus, OrderStatusResult>) =
inherit Controller()
member __.Get(id: string) =
async {
let! result = client.Request { OrderId = id }
return View(result)
}
mscorlib.ni.dll!00007fff7254d408() Unknown
[Managed to Native Transition]
mscorlib.dll!System.ModuleHandle.ResolveMethodHandleInternalCore(System.Reflection.RuntimeModule module, int methodToken, System.IntPtr[] typeInstantiationContext, int typeInstCount, System.IntPtr[] methodInstantiationContext, int methodInstCount) Unknown
mscorlib.dll!System.ModuleHandle.ResolveMethodHandleInternal(System.Reflection.RuntimeModule module, int methodToken, System.RuntimeTypeHandle[] typeInstantiationContext, System.RuntimeTypeHandle[] methodInstantiationContext) Unknown
mscorlib.dll!System.Reflection.CustomAttribute.FilterCustomAttributeRecord(System.Reflection.CustomAttributeRecord caRecord, System.Reflection.MetadataImport scope, ref System.Reflection.Assembly lastAptcaOkAssembly, System.Reflection.RuntimeModule decoratedModule, System.Reflection.MetadataToken decoratedToken, System.RuntimeType attributeFilterType, bool mustBeInheritable, object[] attributes, System.Collections.IList derivedAttributes, out System.Runti
23-Feb-17 11:55:44 - tcConfigData:
{primaryAssembly = Mscorlib;
autoResolveOpenDirectivesToDlls = false;
noFeedback = false;
stackReserveSize = None;
implicitIncludeDir = "E:\github\visualfsharp\vsintegration\src\FSharp.Editor";
openBinariesInMemory = true;
openDebugInformationForLaterStaticLinking = false;
defaultFSharpBinariesDir =
"C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0\";
[F#][INFO 10:01:22 PM] => FSharpNavigationBarItemService.GetItemsAsync
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at Microsoft.VisualStudio.FSharp.Editor.Cancellation.track(String method, CancellationToken ct)
at Microsoft.VisualStudio.FSharp.Editor.FSharpNavigationBarItemService.Microsoft-CodeAnalysis-Editor-INavigationBarItemService-GetItemsAsync(Document document, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Editor.Implementation.NavigationBar.NavigationBarController.<ComputeModelAsync>d__29.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.CodeAnalysis.Editor.Implementation.NavigationBar.NavigationBarController.ComputeModelAsync(Document document, ITextSnapshot snapshot, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Editor.Implementation.NavigationBar.NavigationBarController.<>c__DisplayClass28_0.<S