View 5360e.fs
open System
open System.Diagnostics
for i = 1 to 5 do
let data =
let r = Random i
Array.init 2500 (fun _ ->
Seq.init (r.Next 50) (fun _ -> r.Next 3)
|> Set.ofSeq)
View driver.ps1
$platforms = @("--platform:x86","--platform:x64")
$conditionals = @("--define:IMMUTABLEDICTIONARY", "")
#$platforms = @("--platform:x86")
#$conditionals = @("")
For ($pIdx=0; $pIdx -lt $platforms.Length; $pIdx++) {
$platform = $platforms[$pIdx]
For ($cIdx=0; $cIdx -lt $conditionals.Length; $cIdx++) {
$conditional = $conditionals[$cidx]
View driver.ps1
$platforms = @("--platform:x86","--platform:x64")
$containers = @("", "--define:IMMUTABLESORTEDDICTIONARY")
$types = @("", "--define:FASTCOMPARER")
$orders = @("--define:STRIPES", "--define:RANDOM")
For ($cIdx=0; $cIdx -lt $containers.Length; $cIdx++) {
$container = $containers[$cIdx]
For ($pIdx=0; $pIdx -lt $platforms.Length; $pIdx++) {
$platform = $platforms[$pIdx]
For ($tIdx=0; $tIdx -lt $types.Length; $tIdx++) {
View driver.ps1
$platforms = @("--platform:x86","--platform:x64")
$containers = @("", "--define:IMMUTABLESORTEDDICTIONARY")
$types = @("", "--define:FASTCOMPARER")
$orders = @("--define:STRIPES", "--define:RANDOM")
For ($cIdx=0; $cIdx -lt $containers.Length; $cIdx++) {
$container = $containers[$cIdx]
For ($pIdx=0; $pIdx -lt $platforms.Length; $pIdx++) {
$platform = $platforms[$pIdx]
For ($tIdx=0; $tIdx -lt $types.Length; $tIdx++) {
View 5365a.fs
// 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
View 5360d.fs
open System
open System.Diagnostics
open System
let getNextSequential n =
let r = Random 42
let start = r.Next (n*3/2)
fun i -> (start + i) % n
let getNextRandom n =
View 5360c.fs
open System
open System.Diagnostics
let getNextRandom () =
let r = Random ()
let rec getNext m =
match r.Next () with
| n when m |> Map.containsKey n -> getNext m
| n -> n
getNext
View 5360b.fs
open System
open System.Drawing
open System.Diagnostics
let colours = [
"Transparent", Color.Transparent
"AliceBlue", Color.AliceBlue
"AntiqueWhite", Color.AntiqueWhite
"Aqua", Color.Aqua
"Aquamarine", Color.Aquamarine
View 5360.fs
open System
type KeyStruct(_1':int, _2':int, _3':int) = struct
member this._1 = _1'
member this._2 = _2'
member this._3 = _3'
end
type KeyGenericStruct<'a>(_1':'a, _2':'a, _3':'a) = struct
member this._1 = _1'
View 5307.fs
type KeyStruct(_1':int, _2':int, _3':int) = struct
member this._1 = _1'
member this._2 = _2'
member this._3 = _3'
end
type KeyGenericStruct<'a>(_1':'a, _2':'a, _3':'a) = struct
member this._1 = _1'
member this._2 = _2'
member this._3 = _3'