Last active
July 25, 2018 07:16
-
-
Save manofstick/f285aa7b16025aabd4f60a4b8413ab81 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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