Created
May 16, 2010 20:38
-
-
Save dvdsgl/403149 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[~/Developer/ScalaMono]% cat ScalaMono.scala | |
object ScalaMono extends Application { | |
def fib (i: Int): Int = i match { | |
case 0 | 1 => 1 | |
case i => fib (i - 2) + fib (i - 1) | |
} | |
println (fib (35)) | |
} | |
[~/Developer/ScalaMono]% time mono ScalaMono.exe | |
14930352 | |
mono ScalaMono.exe 0.41s user 0.00s system 98% cpu 0.421 total | |
[~/Developer/ScalaMono]% time scala ScalaMono | |
14930352 | |
scala ScalaMono 83.24s user 0.10s system 98% cpu 1:24.45 total | |
[~/Developer/ScalaMono]% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment