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 3 301 0.000
modules gen 0 2 185 0.000
fib_iter gen 8 8 904 0.008
fib_recursive gen 11 11 915 0.012
asdl_generated gen 11 11 380 0.028
parse gen 23 23 773 0.029
scoped_resource gen 43 38 1,063 0.041
tuple_return_value gen 15 18 197 0.078
containers gen 10 5 116 0.088
files gen 7 7 75 0.098
classes gen 3 0 21 0.149
gc_stack_roots gen 2 2 10 0.179
length gen 41 27 212 0.195
escape gen 97 102 364 0.267
cartesian gen 88 74 326 0.270
varargs gen 12 21 34 0.358
cgi gen 256 263 542 0.472
control_flow gen 208 162 118 1.761
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.5 4.3 12.3 0.36
gc_stack_roots gen 3.4 3.5 8.5 0.40
cartesian gen 3.5 3.5 8.5 0.42
escape gen 3.5 3.7 8.5 0.42
modules gen 3.7 3.7 8.7 0.42
asdl_generated gen 3.7 3.7 8.4 0.44
cgi gen 3.7 3.7 8.4 0.44
scoped_resource gen 3.7 3.7 8.4 0.44
parse gen 3.9 3.8 9.0 0.44
files gen 3.8 3.8 8.5 0.45
fib_iter gen 3.8 3.8 8.4 0.45
fib_recursive gen 3.8 3.7 8.4 0.45
length gen 3.8 3.7 8.4 0.45
loops gen 3.8 3.8 8.4 0.45
tuple_return_value gen 3.8 3.8 8.4 0.45
control_flow gen 3.9 3.8 8.4 0.47
containers gen 28.6 28.6 49.1 0.58
varargs gen 5.5 5.4 8.5 0.65
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 12 0.000
classes gen 0 3 17 0.000
control_flow gen 0 0 8 0.000
fib_iter gen 0 0 4 0.000
fib_recursive gen 0 0 12 0.000
files gen 0 0 8 0.000
gc_stack_roots gen 0 0 10 0.000
modules gen 2 0 12 0.146
containers gen 5 9 28 0.182
cartesian gen 4 12 12 0.332
loops gen 4 0 8 0.465
length gen 4 19 4 0.940
tuple_return_value gen 4 0 4 0.956
scoped_resource gen 4 8 4 0.987
varargs gen 53 45 46 1.164
parse gen 8 4 4 1.884
escape gen 8 0 0 inf
cgi gen 0 4 0 NA
pea_hello gen NA NA 7 NA

raw benchmark files