Skip to content

Instantly share code, notes, and snippets.

@manofstick
Last active Jul 25, 2018
Embed
What would you like to do?
// from https://ayende.com/blog/164865/what-about-f-collections
open System
open System.Diagnostics
let ayende iterations =
let sp = Stopwatch.StartNew ()
let rnd = Random 32
let mutable dic = Map.empty
for i = 0 to iterations-1 do
for item in System.Linq.Enumerable.Range (rnd.Next (0, i), max (i * 2) 16) do
dic <- dic |> Map.add item null
printfn "%s,%d,%d" (if Environment.Is64BitProcess then "64-bit" else "32-bit") iterations sp.ElapsedMilliseconds
for i in [250..250..1500] do
ayende i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment