Skip to content

Instantly share code, notes, and snippets.

@lastcanal
Created February 21, 2013 05:57
Show Gist options
  • Save lastcanal/5002524 to your computer and use it in GitHub Desktop.
Save lastcanal/5002524 to your computer and use it in GitHub Desktop.
Luerl benchmark at 1000 iterations on a macbook air
➜ benchmark git:(benchmark) ✗ make
erlc -I ../../src benchmarks.erl
erl -pa ../../ebin -s benchmarks run -s init stop -noshell
suites/accum.lua ms
ipairs.................. 1617.325
next.................... 2649.867
numeric_for............. 1591.269
numeric_while........... 2686.428
pairs................... 1624.004
unrolled................ 667.943
suites/arguments.lua ms
args_hard_simple........ 53.059
args_recursive_ln....... 127.88
args_recursive_simp..... 131.76
args_select_simple...... 114.314
args_unroll_simple...... 76.033
assert_is............... 83.76
assert_is_alloc......... 96.734
plain_assert............ 35.075
suites/callmap1.lua ms
if_call................. 33.42
map_call................ 26.58
noop.................... 15.093
plain_call.............. 21.62
suites/callmap10.lua ms
if_call................. 376.085
map_call................ 293.977
noop.................... 151.448
plain_call.............. 268.27
suites/chaincall.lua ms
chain_local............. 79.426
chain_upval............. 75.149
plain_chain_local....... 90.225
plain_chain_upval....... 88.906
plain_local............. 67.239
plain_upval............. 68.266
suites/concat.lua ms
mixed_insert............ 17.981
mixed_plus_1............ 114.573
raw_concat.............. 14.569
raw_insert.............. 31.428
raw_plus_1.............. 1105.395
suites/elseif_large.lua ms
callmap_1............... 32.298
callmap_10.............. 35.937
callmap_100............. 34.416
callmap_1000............ 35.389
callmap_15.............. 38.398
callmap_20.............. 33.175
callmap_250............. 39.342
callmap_5............... 34.473
callmap_500............. 36.77
elseif_1................ 35.182
elseif_10............... 44.29
elseif_100.............. 132.589
elseif_1000............. 1066.839
elseif_15............... 50.031
elseif_20............... 59.409
elseif_250.............. 286.968
elseif_5................ 38.91
elseif_500.............. 570.118
plain_1................. 33.218
plain_10................ 30.753
plain_100............... 31.033
plain_1000.............. 33.936
plain_15................ 38.782
plain_20................ 40.276
plain_250............... 32.23
plain_5................. 32.172
plain_500............... 28.12
suites/factory.lua ms
clone_call.............. 179.395
clone_init.............. 27.492
clone_method............ 96.715
inplace_call............ 17.379
inplace_init............ 16.468
inplace_method.......... 96.304
metatable_call.......... 15.497
metatable_init.......... 32.609
metatable_method........ 105.493
plain_call.............. 29.111
plain_init.............. 41.401
plain_method............ 97.988
suites/get.lua ms
nil_num_get............. 23.256
nil_num_plain........... 11.45
nil_num_rawget.......... 13.73
nil_str_get............. 22.886
nil_str_plain........... 13.124
nil_str_rawget.......... 12.749
nil_str_sugar........... 11.007
nonnil_num_get.......... 23.316
nonnil_num_plain........ 12.308
nonnil_num_rawget....... 11.768
nonnil_str_get.......... 25.47
nonnil_str_plain........ 11.672
nonnil_str_rawget....... 14.23
nonnil_str_sugar........ 11.066
suites/inf.lua ms
huge.................... 11.938
suites/is_integer.lua ms
bits_int................ 23.992
bits_int_direct......... 23.226
bits_nonint............. 23.235
bits_nonint_direct...... 25.174
floor_int............... 32.003
floor_int_direct........ 30.15
floor_nonint............ 28.837
floor_nonint_direct..... 28.161
mod_int................. 21.675
mod_int_direct.......... 23.782
mod_nonint.............. 22.847
mod_nonint_direct....... 21.851
noop_int................ 17.516
noop_nonint............. 18.2
suites/mtvsclosure.lua ms
call_setmetatable....... 16.826
create_closure.......... 12.35
use_closure............. 21.99
suites/next_vs_pairs.lua ms
next.................... 6537.709
pairs................... 5502.126
suites/nloop.lua ms
loop_for................ 1172.215
loop_ipairs............. 1002.521
loop_while.............. 1143.678
suites/nloop_simple.lua ms
loop_ipairs_25.......... 503.138
loop_ipairs_5........... 686.397
loop_ipairs_50.......... 497.657
loop_numfor_25.......... 715.529
loop_numfor_5........... 855.661
loop_numfor_50.......... 722.448
loop_while_25........... 870.945
loop_while_5............ 969.715
loop_while_50........... 836.334
suites/return.lua ms
no_ret.................. 14.575
ret_nil................. 16.589
ret_self................ 22.586
ret_true................ 16.987
suites/selectvstable.lua ms
select.................. 161.931
table................... 160.257
suites/sort-simple.lua ms
bubble_callback......... 2616.563
bubble_nocallback....... 1947.584
generate_only........... 197.105
tsort_callback.......... 599.818
tsort_nocallback........ 221.937
suites/str_is_empty.lua ms
empty_constant.......... 10.89
empty_size.............. 11.077
empty_upvalue........... 11.439
nonempty_constant....... 13.488
nonempty_size........... 12.025
nonempty_upvalue........ 13.335
noop.................... 10.213
suites/tailcall.lua ms
notailcall_noreturn..... 31.788
notailcall_return....... 36.853
tailcall_local.......... 28.184
tailcall_nolocal........ 27.054
suites/tclone.lua ms
lua_nucleo.............. 2894.328
tclone2................. 3124.593
tclone5................. 1508.955
tclone6................. 1485.021
suites/vararg.lua ms
call_3_noop_3........... 36.282
call_3_noop_nil......... 31.678
call_3_vararg_3......... 32.764
call_3_vararg_nil....... 30.368
call_noargs_noop_3...... 22.694
call_noargs_noop_nil.... 21.789
call_noargs_vararg_3.... 25.028
call_noargs_vararg_nil.. 22.55
call_vararg_noop_3...... 26.088
call_vararg_noop_nil.... 20.515
call_vararg_vararg_3.... 25.612
call_vararg_vararg_nil.. 23.083
noop.................... 5.846
vararg_callback......... 9.404
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment