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 26 0.000
gc_stack_roots gen 0 2 8 0.000
loops gen 0 0 298 0.000
fib_iter gen 8 4 909 0.009
modules gen 2 2 204 0.009
fib_recursive gen 11 11 886 0.012
asdl_generated gen 12 11 399 0.029
parse gen 23 27 778 0.029
scoped_resource gen 40 43 1,044 0.038
containers gen 10 4 129 0.080
tuple_return_value gen 15 19 189 0.081
files gen 7 8 73 0.101
length gen 45 31 209 0.215
cartesian gen 83 78 338 0.247
escape gen 106 97 360 0.293
cgi gen 261 252 522 0.500
varargs gen 25 25 31 0.805
control_flow gen 202 161 111 1.823
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.5 12.2 0.37
cgi gen 3.5 3.7 8.5 0.42
fib_recursive gen 3.5 3.8 8.5 0.42
parse gen 3.8 3.8 9.1 0.42
gc_stack_roots gen 3.5 3.5 8.4 0.42
asdl_generated gen 3.7 3.7 8.5 0.43
control_flow gen 3.7 3.8 8.5 0.43
escape gen 3.7 3.8 8.5 0.43
tuple_return_value gen 3.7 3.7 8.5 0.43
cartesian gen 3.7 3.5 8.4 0.44
files gen 3.7 3.8 8.4 0.44
length gen 3.8 3.9 8.5 0.45
modules gen 3.8 3.8 8.5 0.45
scoped_resource gen 3.8 3.7 8.5 0.45
loops gen 3.8 3.8 8.4 0.45
fib_iter gen 3.9 3.8 8.4 0.47
containers gen 28.5 28.7 49.1 0.58
varargs gen 5.5 5.6 8.5 0.65
pea_hello gen NA NA 8.1 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 0 16 0.000
escape gen 0 4 4 0.000
fib_iter gen 0 4 8 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 0 12 0.000
length gen 0 16 8 0.000
modules gen 0 0 8 0.000
gc_stack_roots gen 2 0 12 0.175
classes gen 3 0 13 0.257
containers gen 5 11 16 0.319
tuple_return_value gen 4 0 12 0.326
control_flow gen 4 0 12 0.334
loops gen 4 3 8 0.535
parse gen 8 0 12 0.638
cgi gen 8 0 12 0.662
varargs gen 41 41 50 0.825
cartesian gen 8 8 8 0.999
scoped_resource gen 8 4 4 1.979
pea_hello gen NA NA 7 NA

raw benchmark files