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 32 0.000
gc_stack_roots gen 0 2 10 0.000
fib_iter gen 8 4 901 0.009
modules gen 2 2 191 0.009
fib_recursive gen 11 11 905 0.012
loops gen 4 3 307 0.013
asdl_generated gen 12 11 391 0.030
parse gen 27 19 790 0.034
scoped_resource gen 49 42 1,025 0.048
containers gen 10 0 128 0.080
tuple_return_value gen 16 18 185 0.085
files gen 7 8 76 0.097
length gen 40 46 210 0.191
cartesian gen 83 74 326 0.254
escape gen 94 104 361 0.259
cgi gen 266 251 528 0.503
varargs gen 27 16 16 1.686
control_flow gen 205 162 109 1.877
pea_hello gen NA NA 7 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.4 8.4 0.41
scoped_resource gen 3.5 3.8 8.5 0.42
parse gen 3.8 3.9 9.1 0.42
cartesian gen 3.7 3.7 8.5 0.43
escape gen 3.7 3.7 8.5 0.43
fib_iter gen 3.7 3.8 8.5 0.43
fib_recursive gen 3.7 3.8 8.5 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
cgi gen 3.7 3.7 8.4 0.44
files gen 3.7 3.8 8.4 0.44
loops gen 3.7 3.8 8.4 0.44
modules gen 3.8 3.8 8.7 0.44
tuple_return_value gen 3.8 3.7 8.5 0.45
length gen 3.8 3.8 8.4 0.45
control_flow gen 3.9 3.7 8.5 0.46
containers gen 28.5 28.5 49.0 0.58
varargs gen 5.5 5.6 8.4 0.66
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 0 12 0.000
fib_iter gen 0 4 12 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 0 8 0.000
modules gen 0 0 8 0.000
scoped_resource gen 0 4 8 0.000
gc_stack_roots gen 2 0 10 0.184
parse gen 4 8 12 0.315
containers gen 5 14 16 0.320
tuple_return_value gen 4 0 12 0.325
classes gen 3 0 8 0.405
length gen 4 0 8 0.506
varargs gen 38 51 64 0.602
cartesian gen 8 12 12 0.695
cgi gen 4 4 4 0.991
escape gen 12 0 0 inf
asdl_generated gen 0 0 0 NA
loops gen 0 0 0 NA
pea_hello gen NA NA 11 NA

raw benchmark files