$ alias | grep 'alias time'
alias time='/usr/bin/time -f "\nCPU: %Us\tReal: %es\tRAM: %MKB"'
$ time --version
GNU time 1.7
$ g++ --version
g++ (GCC) 4.9.2 20141224 (prerelease)
$ time g++ -std=c++11 scomb.cpp
CPU: 0.18s Real: 0.20s RAM: 35868KB
$ time ./a.out
CPU: 19.32s Real: 19.60s RAM: 548912KB
$ time g++ -std=c++11 -O2 scomb.cpp
CPU: 0.20s Real: 0.24s RAM: 38184KB
$ time ./a.out
CPU: 13.76s Real: 14.05s RAM: 548816KB
$ clang --version
clang version 3.5.1 (tags/RELEASE_351/final)
$ time clang++ -std=c++11 scomb.cpp
CPU: 0.15s Real: 0.20s RAM: 42240KB
$ time ./a.out
CPU: 18.89s Real: 19.21s RAM: 548868KB
$ time clang++ -std=c++11 -O2 scomb.cpp
CPU: 0.20s Real: 0.23s RAM: 45824KB
$ time ./a.out
CPU: 13.87s Real: 14.15s RAM: 548820KB
$ javac -version
javac 1.7.0_71
$ time javac scomb.java
CPU: 1.13s Real: 0.80s RAM: 65324KB
$ time java scomb
CPU: 48.96s Real: 27.59s RAM: 906652KB
$ hhvm --version
HipHop VM 3.5.0 (rel)
$ time hhvm -v Eval.Jit=true scomb.php
CPU: 89.92s Real: 90.38s RAM: 877468KB
$ ruby --version
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
$ time ruby scomb.rb
CPU: 114.67s Real: 115.21s RAM: 870612KB
$ node --version
v0.10.35
$ time node scomb.js
CPU: 17.44s Real: 17.41s RAM: 411144KB
$ pacman -Qo `which jsc-3`
/usr/bin/jsc-3 is owned by webkitgtk 2.4.8-1
$ time jsc-3 scomb.js
CPU: 60.08s Real: 43.66s RAM: 834744KB
$ js24 --help | grep Version
Version: JavaScript-C24.2.0
$ time js24 scomb.js
CPU: 19.27s Real: 19.62s RAM: 735556KB
$ go version
go version go1.4.1 linux/amd64
$ time go build scomb.go
CPU: 0.14s Real: 0.17s RAM: 30428KB
$ time ./scomb
CPU: 11.45s Real: 11.54s RAM: 251628KB
$ scala -version
Scala code runner version 2.11.5 -- Copyright 2002-2013, LAMP/EPFL
$ time scala -J-Xmx3000M scomb.scala
CPU: 83.42s Real: 46.10s RAM: 1093924KB
$ python --version
Python 3.4.2
$ time python scomb.py
CPU: 121.33s Real: 122.06s RAM: 641844KB
$ pypy --version
Python 2.7.8 (c6ad44ecf5d8, Nov 18 2014, 18:04:31) [PyPy 2.4.0 with GCC 4.9.2]
$ time pypy scomb.py
CPU: 14.72s Real: 14.97s RAM: 522080KB
$ lua -v
Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio
$ time lua scomb.lua
CPU: 98.11s Real: 98.54s RAM: 863880KB
$ luajit -v
LuaJIT 2.0.3 -- Copyright (C) 2005-2014 Mike Pall.
$ time luajit scomb.lua
CPU: 21.30s Real: 21.61s RAM: 511268KB
$ dart --version
Dart VM version: 1.8.5 (Tue Jan 13 12:44:14 2015) on "linux_x64"
$ time dart scomb.dart
CPU: 11.92s Real: 12.15s RAM: 497788KB
Compiler / Interpreter | Language | Compile Duration | Compile RAM | Runtime Duration | Runtime RAM | Total Duration |
g++ (debug) | C++ | 180 | 35868 | 19320 | 548912 | 19500 |
g++ (-O2) | C++ | 200 | 38184 | 13760 | 548816 | 13960 |
clang++ (debug) | C++ | 150 | 42240 | 18890 | 548868 | 19040 |
clang++ (-O2) | C++ | 200 | 45824 | 13870 | 548820 | 14070 |
javac, java | Java | 1130 | 65324 | 48960 | 906652 | 50090 |
hhvm | PHP | 89920 | 877468 | 89920 | ||
ruby | Ruby | 114670 | 870612 | 114670 | ||
node | Javascript | 17440 | 411144 | 17440 | ||
jsc-3 | Javascript | 60080 | 834744 | 60080 | ||
js24 | Javascript | 19270 | 735556 | 19270 | ||
go | Go | 140 | 30428 | 11450 | 251628 | 11590 |
scala | Scala | 83420 | 1093924 | 83420 | ||
python3 | Python 3 | 121330 | 641844 | 121330 | ||
pypy | Python 2 | 14720 | 522080 | 14720 | ||
lua | Lua | 98110 | 863880 | 98110 | ||
luajit | Lua | 21300 | 511268 | 21300 | ||
dart | Dart | 11920 | 497788 | 11920 |
Write down your opinion (or pastie if you found a bug on these source, or if you want to add more language implementation) on the comment section ^^)b
Note #1: PHP 5.6.4, Rubinius 2.5.2, JRuby 9.0.0a1, Rhino 1.7, MCS 3.12 failed to end their execution within approx. 120s timeout
No comments:
Post a Comment
THINK: is it True? is it Helpful? is it Inspiring? is it Necessary? is it Kind?