by fleitz · 15y ago · 0 comments
// Learn more about F# at http://fsharp.net
open System
let consume x = ()
let start = System.Environment.TickCount
let arr = [| 1..4 |]
for i = 1 to 100000 do
arr
|> Array.filter (fun y -> (y % 2) = 0)
|> consume
let endTime = System.Environment.TickCount
printf "%d milliseconds" (endTime - start)I do hope to learn more about F#, I am hearing good things about it.
Great article about how F# can approach the speed of C with some fancy inlining.