Skip to content

Instantly share code, notes, and snippets.

@manofstick
Created July 4, 2018 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manofstick/b4fa5acc1abe3ca73a77a7eea12d205a to your computer and use it in GitHub Desktop.
Save manofstick/b4fa5acc1abe3ca73a77a7eea12d205a to your computer and use it in GitHub Desktop.
module Program
open Perf
open System
open System.Diagnostics
module Tortoise =
let test () =
let today = DateTime.Now
let tomorrow = today.AddDays 1.0
let mutable result = 0
for i = 1 to 10000000 do
result <- result + if today <= tomorrow then 1 else 0
[<EntryPoint>]
let main argv =
printfn "%s" Id.Name
for __ = 1 to 5 do
let sw = Stopwatch.StartNew ()
for i = 1 to 10 do
Tortoise.test ()
printfn "%A" sw.ElapsedMilliseconds
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment