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
gc_stack_roots gen 0 0 8 0.000
loops gen 0 3 305 0.000
fib_iter gen 4 8 942 0.004
modules gen 2 2 193 0.009
fib_recursive gen 11 11 898 0.012
asdl_generated gen 7 0 377 0.019
containers gen 4 7 119 0.032
parse gen 30 23 770 0.040
scoped_resource gen 43 37 1,027 0.042
tuple_return_value gen 19 15 194 0.098
files gen 7 7 72 0.102
classes gen 3 0 30 0.108
length gen 44 34 217 0.204
cartesian gen 87 78 334 0.260
escape gen 98 95 353 0.277
varargs gen 12 27 40 0.309
cgi gen 269 265 534 0.503
control_flow gen 204 159 112 1.823
pea_hello gen NA NA 9 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.4 0.41
parse gen 3.8 3.9 9.1 0.42
escape gen 3.5 3.7 8.4 0.42
asdl_generated gen 3.7 3.7 8.5 0.43
modules gen 3.7 3.7 8.5 0.43
cartesian gen 3.7 3.5 8.4 0.44
fib_iter gen 3.7 3.7 8.4 0.44
fib_recursive gen 3.7 3.8 8.4 0.44
length gen 3.7 3.8 8.4 0.44
scoped_resource gen 3.7 3.5 8.4 0.44
files gen 3.8 3.7 8.5 0.45
loops gen 3.8 3.8 8.5 0.45
cgi gen 3.8 3.7 8.4 0.45
tuple_return_value gen 3.8 3.7 8.4 0.45
control_flow gen 3.9 3.8 8.7 0.45
containers gen 28.4 28.6 49.2 0.58
varargs gen 5.5 5.4 8.4 0.66
pea_hello gen NA NA 8.3 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cgi gen 0 4 8 0.000
classes gen 0 3 9 0.000
fib_recursive gen 0 0 4 0.000
files gen 0 0 12 0.000
length gen 0 11 4 0.000
modules gen 0 0 4 0.000
parse gen 0 4 8 0.000
tuple_return_value gen 0 4 8 0.000
gc_stack_roots gen 2 2 12 0.153
asdl_generated gen 4 11 12 0.298
control_flow gen 4 4 12 0.334
containers gen 11 7 24 0.482
cartesian gen 4 8 8 0.491
scoped_resource gen 4 8 8 0.493
fib_iter gen 4 0 4 0.951
varargs gen 53 38 40 1.341
escape gen 8 8 4 2.032
loops gen 4 0 0 inf
pea_hello gen NA NA 9 NA

raw benchmark files