Lukas Domagala

  Home  |   Contact  |   Syndication    |   Login
  6 Posts | 0 Stories | 8 Comments | 0 Trackbacks

News

I have joined Anti-IF Campaign
Subscribe in a reader

Tag Cloud


Archives

Post Categories

Array

There are 1 entries for the tag Array
I ran into some rather interesting numbers while trying to optimize my Connect Four implementation. Try to guess what this code will print out: let test= let stop1 = Stopwatch.StartNew() let list = [1..1000000] let bla = list |> List.fold (fun state x -> state + x) 0 stop1.Stop() let stop2 = Stopwatch.StartNew() let seq = seq{1..1000000} |> Seq.fold (fun state x -> state + x) 0 stop2.Stop() let stop3 = Stopwatch.StartNew() let arr = [|1..1000000|] let arr1 = arr|> Array.fold (fun state...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati