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 0 35 0.000
loops gen 2 3 291 0.007
fib_iter gen 8 8 898 0.009
modules gen 2 2 195 0.010
fib_recursive gen 11 11 905 0.012
asdl_generated gen 7 4 395 0.019
containers gen 4 7 111 0.035
scoped_resource gen 40 42 1,033 0.039
parse gen 30 27 764 0.040
files gen 4 8 71 0.054
tuple_return_value gen 20 19 196 0.100
gc_stack_roots gen 2 2 10 0.178
length gen 45 40 217 0.206
cartesian gen 85 82 329 0.260
escape gen 103 101 365 0.282
cgi gen 265 248 544 0.487
varargs gen 28 8 24 1.151
control_flow gen 210 160 109 1.928
pea_hello gen NA NA 4 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.3 0.36
gc_stack_roots gen 3.4 3.5 8.4 0.41
cgi gen 3.5 3.7 8.5 0.42
asdl_generated gen 3.7 3.7 8.5 0.43
escape gen 3.7 3.5 8.5 0.43
fib_iter gen 3.7 3.5 8.5 0.43
modules gen 3.7 3.8 8.5 0.43
tuple_return_value gen 3.7 3.7 8.5 0.43
parse gen 3.9 3.8 9.1 0.43
cartesian gen 3.7 3.7 8.4 0.44
fib_recursive gen 3.7 3.7 8.4 0.44
length gen 3.7 3.8 8.4 0.44
scoped_resource gen 3.7 3.8 8.4 0.44
control_flow gen 3.8 3.9 8.5 0.45
files gen 3.8 3.8 8.5 0.45
loops gen 3.9 3.8 8.5 0.46
containers gen 28.5 28.3 49.1 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
control_flow gen 0 0 12 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 0 12 0.000
gc_stack_roots gen 0 0 10 0.000
length gen 0 8 4 0.000
modules gen 0 0 8 0.000
parse gen 0 0 12 0.000
tuple_return_value gen 0 0 4 0.000
loops gen 2 0 16 0.135
asdl_generated gen 4 8 16 0.233
files gen 4 0 12 0.325
containers gen 12 7 32 0.367
cartesian gen 8 4 12 0.684
varargs gen 39 58 56 0.705
classes gen 4 3 4 0.912
cgi gen 4 4 4 0.989
scoped_resource gen 8 4 4 2.000
escape gen 4 4 0 inf
pea_hello gen NA NA 15 NA

raw benchmark files