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
loops gen 0 0 308 0.000
fib_iter gen 8 8 903 0.008
modules gen 2 0 185 0.010
fib_recursive gen 11 11 895 0.012
asdl_generated gen 7 11 392 0.018
parse gen 23 27 777 0.030
scoped_resource gen 40 46 1,080 0.037
containers gen 8 7 131 0.059
tuple_return_value gen 19 15 208 0.092
files gen 7 7 76 0.096
gc_stack_roots gen 2 2 15 0.112
classes gen 3 0 27 0.120
length gen 33 37 211 0.158
cartesian gen 79 84 325 0.242
escape gen 93 103 360 0.259
cgi gen 265 268 524 0.505
varargs gen 20 25 36 0.564
control_flow gen 212 160 114 1.867
pea_hello gen NA NA 12 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.5 0.40
cartesian gen 3.5 3.7 8.5 0.42
scoped_resource gen 3.5 3.7 8.5 0.42
parse gen 3.8 3.9 9.1 0.42
control_flow gen 3.7 3.8 8.7 0.42
modules gen 3.7 3.7 8.7 0.42
cgi gen 3.7 3.5 8.5 0.43
escape gen 3.7 3.5 8.5 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
fib_iter gen 3.7 3.8 8.4 0.44
fib_recursive gen 3.7 3.5 8.4 0.44
tuple_return_value gen 3.7 3.8 8.4 0.44
length gen 3.8 3.7 8.5 0.45
loops gen 3.8 3.8 8.5 0.45
files gen 3.9 3.7 8.5 0.46
containers gen 28.5 28.5 49.2 0.58
varargs gen 5.6 5.6 8.4 0.67
pea_hello gen NA NA 8.0 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 3 12 0.000
control_flow gen 0 0 8 0.000
fib_iter gen 0 0 4 0.000
fib_recursive gen 0 0 4 0.000
files gen 0 0 8 0.000
gc_stack_roots gen 0 0 4 0.000
modules gen 0 2 12 0.000
tuple_return_value gen 0 4 4 0.000
cgi gen 4 0 8 0.499
containers gen 8 7 12 0.630
parse gen 8 0 12 0.637
loops gen 4 3 4 0.913
cartesian gen 12 4 12 0.993
varargs gen 45 41 44 1.014
length gen 11 8 8 1.398
escape gen 12 0 8 1.457
asdl_generated gen 4 0 0 inf
scoped_resource gen 8 0 0 inf
pea_hello gen NA NA 8 NA

raw benchmark files