mycpp Code Generation

Measure the speedup from mycpp, and the resource usage.

Source code: oil/mycpp/examples

User Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
loops gen 0 3 282 0.000
modules gen 0 2 183 0.000
fib_iter gen 8 8 891 0.009
fib_recursive gen 11 11 913 0.012
asdl_generated gen 7 11 370 0.019
containers gen 4 0 109 0.037
parse gen 30 27 775 0.038
scoped_resource gen 48 42 1,045 0.046
files gen 4 0 72 0.050
tuple_return_value gen 12 18 196 0.063
gc_stack_roots gen 2 0 12 0.154
length gen 45 44 206 0.221
cartesian gen 88 83 336 0.262
escape gen 97 93 352 0.275
classes gen 3 0 12 0.286
cgi gen 270 254 509 0.530
varargs gen 21 12 20 1.035
control_flow gen 207 162 105 1.968

Max Resident Set Size (MB)

Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).

example name gen C++ C++-Souffle Python C++ : Python
classes gen 4.3 4.5 10.6 0.41
parse gen 3.7 3.9 7.6 0.48
fib_iter gen 3.4 3.7 6.9 0.49
cartesian gen 3.5 3.7 7.1 0.50
cgi gen 3.5 3.7 6.9 0.51
gc_stack_roots gen 3.5 3.4 6.9 0.51
length gen 3.7 3.7 7.1 0.52
modules gen 3.7 3.7 7.1 0.52
asdl_generated gen 3.7 3.5 6.9 0.53
escape gen 3.7 3.5 6.9 0.53
fib_recursive gen 3.7 3.7 6.9 0.53
tuple_return_value gen 3.7 3.7 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
scoped_resource gen 3.8 3.8 7.1 0.54
control_flow gen 3.8 3.9 6.9 0.55
files gen 3.8 3.9 6.9 0.55
containers gen 28.6 28.5 47.6 0.60
varargs gen 5.5 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cgi gen 0 0 8 0.000
classes gen 0 3 19 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 0 12 0.000
parse gen 0 0 4 0.000
scoped_resource gen 0 4 4 0.000
asdl_generated gen 4 0 12 0.301
loops gen 4 0 12 0.313
containers gen 12 15 28 0.424
modules gen 2 0 4 0.460
control_flow gen 4 0 8 0.492
cartesian gen 4 4 8 0.501
varargs gen 46 55 52 0.876
files gen 4 8 4 0.907
escape gen 8 12 4 1.939
tuple_return_value gen 8 0 0 inf
gc_stack_roots gen 0 2 0 NA
length gen 0 0 0 NA

raw benchmark files