Showing posts from March, 2015

Rust: fib

Rust is an interesting language. It is not a primitive one, like Go where we don't have ADTs, pattern matching and generics (but we do have Nils). And it's advertising as a safe and performant system language. Today is the very first day I'm looking at it. Let's "smoke" test it with Fibonacci :)

Debug: 3.44 seconds, release: 1.66 seconds. This is not very impressive, but pretty fast indeed.
C# - 1.26D (DMD) - 1.3F# - 1.38Nemerle - 1.45Rust - 1.66Haskell - 2.8Clojure - 9Erlang - 17Ruby - 60Python - 120 It's very interesting how it'll behave in concurrent Fibonacci test.

The compiler is quite slow: it takes 2-3 seconds to build this tiny program.