Created
June 9, 2011 10:01
-
-
Save cfr/1016452 to your computer and use it in GitHub Desktop.
This file contains 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
Interpreted & compiled Haskell & C + interpreted Python | |
======================================================= | |
$ time sh ./nice-langs.sh >> /dev/null | |
⇒ | |
* real *9.117* s | |
* user 2.370 s | |
* sys 0.720 s | |
Interpreted Scala | |
================= | |
$ time scala hello.hs >> /dev/null | |
⇒ | |
* real *18.525* s | |
* user 1.987 s | |
* sys 0.280 s | |
This file contains 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
#include <stdio.h> | |
int main() { printf("hello world\n"); return 1; } |
This file contains 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
main = putStrLn "hello world" |
This file contains 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
print "hello world" |
This file contains 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
println("Hello, world!") |
This file contains 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
# interpreting haskell | |
ghc -e "main" hello.hs | |
# compiling and running haskell | |
ghc -v0 -O3 --make hello.hs -o hello-hs && ./hello-hs | |
# interpreting C | |
tcc -run hello.c | |
# compiling and running C | |
gcc -O3 hello.c -o hello-c && ./hello-c | |
# interpreting python | |
python2 hello.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment