Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Real-world benchmarks
$ time ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
real 0m0.074s
user 0m0.006s
sys 0m0.012s
$ time node --version
v0.10.15
real 0m0.013s
user 0m0.009s
sys 0m0.003s
$ time ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.2]
real 0m0.058s
user 0m0.029s
sys 0m0.026s
@DanielHeath

This comment has been minimized.

Copy link

commented Sep 17, 2013

$ time go version
go version go1.1.2 darwin/386

real 0m0.020s
user 0m0.015s
sys 0m0.004s

@DanielHeath

This comment has been minimized.

Copy link

commented Sep 17, 2013

That settles it. Node is faster than go.

@richo

This comment has been minimized.

Copy link

commented Sep 17, 2013

elektra ⚡ time (echo $ZSH_VERSION)
5.0.2
( echo $ZSH_VERSION; ) 0.00s user 0.00s system 57% cpu 0.001 total
elektra ⚡

@richo

This comment has been minimized.

Copy link

commented Sep 17, 2013

Get on my level.

@dstrctrng

This comment has been minimized.

Copy link

commented Sep 17, 2013

Bash wins: > time echo $BASH_VERSION
3.2.48(1)-release

real 0m0.000s
user 0m0.000s
sys 0m0.000s

@sporto

This comment has been minimized.

Copy link

commented Sep 17, 2013

Lua wins!

time lua -v
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio

real 0m0.003s
user 0m0.001s
sys 0m0.001s

@dstrctrng

This comment has been minimized.

Copy link

commented Sep 17, 2013

Bash wins over Zsh becasue of more zeros, more faster.

@sharpobject

This comment has been minimized.

Copy link

commented Sep 17, 2013

Oh snap, Lua is 4x faster than Node.

@richo

This comment has been minimized.

Copy link

commented Sep 17, 2013

I think you exploited a quirk in bash. To my mind that shouldn't have forked for either call, rendering the (totally pointless anyway) benchmark nonsensical.

My reasoning is that in zsh:

elekt 1 ⚡ which time
time: shell reserved word
elektra ⚡ which echo
echo: shell built-in command
elektra ⚡ time echo $ZSH_VERSION
5.0.2
elektra ⚡
@sharpobject

This comment has been minimized.

Copy link

commented Sep 17, 2013

$ /usr/bin/time /bin/echo $BASH_VERSION
3.2.48(1)-release
0.00 real 0.00 user 0.00 sys

@michaelklishin

This comment has been minimized.

Copy link

commented Sep 17, 2013

Shell scale!

@svenyurgensson

This comment has been minimized.

Copy link

commented Sep 17, 2013

time java -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

real 0m0.330s
user 0m0.061s
sys 0m0.017s

Java sucks ?

@algernon

This comment has been minimized.

Copy link

commented Sep 17, 2013

(benchmark 1 '(message emacs-version))
"24.3.50.1"
;; Elapsed time: 0.000228s
@pozorvlak

This comment has been minimized.

Copy link

commented Sep 17, 2013

$ time perl -v

This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi
(with 56 registered patches, see perl -V for more detail)

Copyright 1987-2011, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

real 0m0.004s
user 0m0.004s
sys 0m0.000s

@Therzok

This comment has been minimized.

Copy link

commented Sep 17, 2013

time mono --version
Mono JIT compiler version 3.0.7 (tarball Fri May 24 19:08:44 UTC 2013)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)

real 0m0.002s
user 0m0.000s
sys 0m0.000s

@droope

This comment has been minimized.

Copy link

commented Sep 17, 2013

time python -v
real 0m0.000000002s
user 0m0.000000000s
sys 0m0.0000000000s

take that suckers

@Therzok

This comment has been minimized.

Copy link

commented Sep 17, 2013

@droope, would've been better if you had same number of zeros everywhere.

@joshkunz

This comment has been minimized.

Copy link

commented Sep 17, 2013

@droope Also, that's not actually the command to print python's version (try -V).

@Roguelazer

This comment has been minimized.

Copy link

commented Sep 17, 2013

Wow, hy is awfully slow. I guess I'll have to stop using it.

% time hy --version
hy 0.9.10
hy --version  0.05s user 0.02s system 97% cpu 0.075 total
@droope

This comment has been minimized.

Copy link

commented Sep 18, 2013

WHAT??!?!?! My code, and this benchmark are a standard industry best practice, highly recommended by all the professionals in this industry.

I have no clue what you two are on about;

@gquemener

This comment has been minimized.

Copy link

commented Sep 18, 2013

time php -v
PHP 5.4.9-4ubuntu2.3 (cli) (built: Sep  4 2013 19:32:25)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
php -v  0.02s user 0.01s system 87% cpu 0.032 total
@docteurklein

This comment has been minimized.

Copy link

commented Sep 18, 2013

time php --version
PHP 5.4.15-1~quantal+1 (cli) (built: May 12 2013 22:24:11) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans
php --version  0,01s user 0,02s system 97% cpu 0,029 total
@glubo

This comment has been minimized.

Copy link

commented Sep 19, 2013

sykop5am@hppro ~ % time gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.2/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.2/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.7.2-r1/work/gcc-4.7.2/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.2 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.2 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.2/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.2/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-cloog --without-ppl --disable-lto --enable-nls --without-included-gettext --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --enable-multilib --with-multilib-list=m32,m64 --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.7.2/python --enable-checking=release --disable-libgcj --enable-libstdcxx-time --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.7.2-r1 p1.6, pie-0.5.5'
Thread model: posix
gcc version 4.7.2 (Gentoo 4.7.2-r1 p1.6, pie-0.5.5)
gcc -v 0.00s user 0.00s system 13% cpu 0.015 total

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.