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
gc_stack_roots gen 0 0 12 0.000
fib_recursive gen 7 11 905 0.008
fib_iter gen 8 8 889 0.009
modules gen 2 2 187 0.010
loops gen 4 0 294 0.013
asdl_generated gen 11 11 390 0.027
containers gen 4 10 119 0.033
parse gen 26 23 771 0.034
scoped_resource gen 40 45 1,021 0.039
files gen 4 7 81 0.045
tuple_return_value gen 15 18 191 0.080
classes gen 3 3 25 0.124
length gen 37 46 207 0.181
cartesian gen 79 82 358 0.222
escape gen 102 103 353 0.287
cgi gen 264 268 517 0.511
varargs gen 31 15 25 1.234
control_flow gen 204 164 111 1.835
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.3 4.5 12.2 0.35
gc_stack_roots gen 3.4 3.5 8.4 0.41
cgi gen 3.5 3.7 8.4 0.42
cartesian gen 3.7 3.5 8.5 0.43
scoped_resource gen 3.7 3.7 8.5 0.43
parse gen 3.9 3.8 9.1 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
escape gen 3.7 3.7 8.4 0.44
files gen 3.7 3.8 8.4 0.44
tuple_return_value gen 3.7 3.8 8.4 0.44
loops gen 3.8 3.8 8.7 0.44
modules gen 3.8 3.7 8.5 0.45
fib_iter gen 3.8 3.7 8.4 0.45
fib_recursive gen 3.8 3.7 8.4 0.45
length gen 3.8 3.8 8.4 0.45
control_flow gen 3.9 3.9 8.5 0.46
containers gen 28.4 28.5 49.1 0.58
varargs gen 5.5 5.5 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
asdl_generated gen 0 0 8 0.000
classes gen 0 0 13 0.000
fib_iter gen 0 0 8 0.000
loops gen 0 3 12 0.000
modules gen 0 0 8 0.000
gc_stack_roots gen 2 2 8 0.233
control_flow gen 4 0 12 0.336
parse gen 4 4 8 0.472
tuple_return_value gen 4 0 8 0.482
escape gen 4 0 8 0.486
containers gen 12 5 24 0.489
cgi gen 4 0 8 0.499
length gen 7 0 12 0.616
varargs gen 35 50 54 0.641
scoped_resource gen 8 0 12 0.665
files gen 4 0 4 0.905
cartesian gen 12 4 8 1.482
fib_recursive gen 4 0 0 inf
pea_hello gen NA NA 7 NA

raw benchmark files