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 23 0.000
gc_stack_roots gen 0 2 7 0.000
fib_iter gen 4 8 1,055 0.004
modules gen 2 2 185 0.011
fib_recursive gen 11 11 901 0.012
loops gen 4 3 301 0.012
asdl_generated gen 7 11 388 0.019
scoped_resource gen 32 42 1,021 0.031
parse gen 31 27 772 0.040
files gen 7 8 84 0.088
tuple_return_value gen 19 19 198 0.098
containers gen 12 4 121 0.102
length gen 37 42 204 0.183
cartesian gen 83 80 337 0.247
escape gen 99 99 352 0.282
cgi gen 249 253 526 0.473
varargs gen 21 8 32 0.632
control_flow gen 207 158 110 1.878
pea_hello gen NA NA 16 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.4 0.36
gc_stack_roots gen 3.4 3.5 8.4 0.41
cgi gen 3.5 3.7 8.5 0.42
parse gen 3.8 3.9 9.0 0.42
control_flow gen 3.7 3.8 8.5 0.43
escape gen 3.7 3.5 8.5 0.43
scoped_resource gen 3.7 3.5 8.5 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
cartesian gen 3.7 3.5 8.4 0.44
tuple_return_value gen 3.7 3.7 8.4 0.44
modules gen 3.8 3.7 8.7 0.44
fib_iter gen 3.8 3.7 8.5 0.45
fib_recursive gen 3.8 3.8 8.5 0.45
files gen 3.8 3.8 8.5 0.45
loops gen 3.8 3.8 8.5 0.45
length gen 3.9 3.8 8.5 0.46
containers gen 28.5 28.5 49.2 0.58
varargs gen 5.4 5.5 8.4 0.64
pea_hello gen NA NA 8.0 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
control_flow gen 0 4 12 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 0 4 0.000
loops gen 0 0 8 0.000
modules gen 0 0 12 0.000
parse gen 0 0 8 0.000
tuple_return_value gen 0 0 4 0.000
gc_stack_roots gen 2 0 14 0.141
containers gen 4 11 28 0.145
classes gen 3 0 19 0.173
asdl_generated gen 4 0 12 0.307
fib_iter gen 4 0 8 0.478
cgi gen 4 0 8 0.496
length gen 8 4 16 0.519
escape gen 8 4 12 0.661
cartesian gen 8 8 12 0.666
varargs gen 45 59 49 0.927
scoped_resource gen 16 4 16 0.989
pea_hello gen NA NA 4 NA

raw benchmark files