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
classes gen 0 3 24 0.000
containers gen 0 11 111 0.000
files gen 0 8 84 0.000
loops gen 0 3 301 0.000
modules gen 0 0 186 0.000
fib_recursive gen 7 7 884 0.008
fib_iter gen 8 8 901 0.008
asdl_generated gen 7 11 381 0.019
parse gen 30 27 762 0.040
scoped_resource gen 48 46 1,012 0.047
tuple_return_value gen 15 18 199 0.076
gc_stack_roots gen 2 0 16 0.112
length gen 32 41 216 0.150
escape gen 85 92 401 0.213
cartesian gen 83 80 353 0.234
cgi gen 268 262 547 0.491
varargs gen 19 23 32 0.602
control_flow gen 207 162 115 1.791
pea_hello gen NA NA 11 NA

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.5 4.3 12.3 0.36
fib_recursive gen 3.4 3.9 8.4 0.41
gc_stack_roots gen 3.4 3.5 8.4 0.41
asdl_generated gen 3.5 3.7 8.5 0.42
tuple_return_value gen 3.5 3.8 8.5 0.42
parse gen 3.8 3.7 9.1 0.42
escape gen 3.7 3.5 8.5 0.43
files gen 3.7 3.8 8.5 0.43
loops gen 3.7 3.8 8.5 0.43
modules gen 3.7 3.7 8.5 0.43
cartesian gen 3.7 3.5 8.4 0.44
cgi gen 3.7 3.7 8.4 0.44
control_flow gen 3.8 3.9 8.5 0.45
fib_iter gen 3.8 3.8 8.4 0.45
length gen 3.8 3.8 8.4 0.45
scoped_resource gen 3.8 3.7 8.4 0.45
containers gen 28.5 28.5 49.2 0.58
varargs gen 5.5 5.6 8.4 0.66
pea_hello gen NA NA 8.1 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
fib_iter gen 0 0 8 0.000
gc_stack_roots gen 0 2 4 0.000
parse gen 0 0 16 0.000
scoped_resource gen 0 0 20 0.000
modules gen 2 2 12 0.151
classes gen 3 0 16 0.206
containers gen 16 4 36 0.444
fib_recursive gen 4 4 8 0.458
loops gen 4 0 8 0.482
control_flow gen 4 0 8 0.499
tuple_return_value gen 4 0 8 0.541
asdl_generated gen 4 0 4 0.899
varargs gen 47 43 48 0.963
cartesian gen 8 8 8 1.031
length gen 12 4 4 3.046
escape gen 19 12 4 4.842
files gen 8 0 0 inf
cgi gen 0 8 0 NA
pea_hello gen NA NA 8 NA

raw benchmark files