Euler Project Problem 14 in F# - An exercise in optimization
The coding “coding-experiments” blog presents two alterative solutions to the “Euler Project Problem 14” (http://projecteuler.net/print.php?id=14):
http://coding-experiments.blogspot.com/2008/03/projecteulernet-problem-14-csharp-vs.html
His F# solution is around 55 times slower in than the C# version, the implication being that while F# is elegant, it’s also slow. My problem with this conjecture is that that the implementation of the F# version is considerably different to the implementation of the C# version. So lets have a look at the two different version, first the F#:
let seq_length n =
n |>
Seq.unfold(fun x ->
match x...