Home
Insert
Update snippet 'One-liner generic timing function'
Title
Description
Generic higher-order function to measure timing of a given function
Source code
let time f x = System.Diagnostics.Stopwatch.StartNew() |> (fun sw -> (f x, sw.Elapsed))
Tags
one-liner
timing
one-liner
timing
Author
Link
Reference NuGet packages
If your snippet has external dependencies, enter the names of NuGet packages to reference, separated by a comma (
#r
directives are not required).
Update