1
module ParasitemiaCore.EllipsesBench
4 open System.Diagnostics
5 open type System.Console
7 open ParasitemiaCore.Ellipse
9 let rng = System.Random (42)
11 let generateParameters () : float * float * float * float * float * float * float * float =
25 for i
in 1 .. 500_000 do
26 let p1x, p1y
, m1
, p2x
, p2y
, m2
, p3x
, p3y
= generateParameters ()
27 ellipse
p1x p1y m1 p2x p2y m2 p3x p3y
|> ignore
30 WriteLine (sprintf
"Old: time = %A ms" sw.ElapsedMilliseconds)
37 for i
in 1 .. 500_000 do
38 let p1x, p1y
, m1
, p2x
, p2y
, m2
, p3x
, p3y
= generateParameters ()
39 ellipse
' p1x p1y m1 p2x p2y m2 p3x p3y |> ignore
42 WriteLine (sprintf "New: time = %A ms" sw.ElapsedMilliseconds)