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 23 0.000
fib_recursive gen 7 11 891 0.008
fib_iter gen 8 8 937 0.008
modules gen 2 2 192 0.009
loops gen 4 3 297 0.012
asdl_generated gen 5 11 381 0.014
parse gen 23 19 777 0.029
scoped_resource gen 43 42 1,030 0.042
tuple_return_value gen 11 15 205 0.056
files gen 7 7 76 0.096
containers gen 15 7 126 0.120
length gen 33 45 208 0.160
gc_stack_roots gen 2 2 8 0.221
cartesian gen 85 69 337 0.254
varargs gen 12 16 48 0.259
escape gen 105 103 351 0.300
cgi gen 269 263 525 0.511
control_flow gen 206 161 113 1.830
pea_hello gen NA NA 5 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.1 0.37
parse gen 3.7 3.7 9.1 0.40
cartesian gen 3.5 3.5 8.5 0.42
gc_stack_roots gen 3.5 3.4 8.4 0.42
cgi gen 3.5 3.7 8.3 0.43
asdl_generated 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.5 8.5 0.43
scoped_resource gen 3.7 3.8 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
modules gen 3.8 3.7 8.5 0.45
control_flow gen 3.8 3.9 8.4 0.45
loops gen 3.8 3.8 8.4 0.45
fib_recursive gen 3.9 3.8 8.5 0.46
files gen 3.9 3.8 8.4 0.47
containers gen 28.5 28.5 49.1 0.58
varargs gen 5.5 5.5 8.5 0.65
pea_hello gen NA NA 8.0 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cgi gen 0 4 8 0.000
control_flow gen 0 0 8 0.000
escape gen 0 0 8 0.000
fib_iter gen 0 0 4 0.000
files gen 0 0 8 0.000
gc_stack_roots gen 0 0 12 0.000
loops gen 0 0 8 0.000
modules gen 0 0 4 0.000
classes gen 3 0 15 0.206
containers gen 4 7 16 0.233
fib_recursive gen 4 0 12 0.299
scoped_resource gen 4 4 12 0.327
asdl_generated gen 5 0 8 0.671
parse gen 8 8 8 0.944
tuple_return_value gen 8 4 8 0.955
length gen 11 0 8 1.385
varargs gen 54 49 32 1.684
cartesian gen 4 16 0 inf
pea_hello gen NA NA 14 NA

raw benchmark files