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 2 12 0.000
fib_recursive gen 7 11 884 0.008
fib_iter gen 8 8 918 0.009
modules gen 2 0 189 0.010
loops gen 4 0 288 0.015
asdl_generated gen 8 8 391 0.020
parse gen 27 27 781 0.035
scoped_resource gen 44 33 1,046 0.042
containers gen 8 7 126 0.064
classes gen 3 0 33 0.102
tuple_return_value gen 19 15 188 0.103
files gen 8 8 70 0.107
length gen 38 43 215 0.176
escape gen 98 99 401 0.244
cartesian gen 84 75 330 0.253
cgi gen 266 263 525 0.507
varargs gen 33 4 31 1.055
control_flow gen 213 159 111 1.915
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.5 12.3 0.36
cartesian gen 3.5 3.5 8.5 0.42
modules gen 3.5 3.5 8.5 0.42
asdl_generated gen 3.5 3.7 8.4 0.42
length gen 3.5 3.7 8.4 0.42
parse gen 3.8 3.8 9.0 0.42
escape gen 3.7 3.7 8.4 0.44
gc_stack_roots gen 3.7 3.5 8.4 0.44
fib_recursive gen 3.8 3.7 8.5 0.45
loops gen 3.8 3.8 8.5 0.45
scoped_resource gen 3.8 3.7 8.5 0.45
tuple_return_value gen 3.8 3.7 8.5 0.45
cgi gen 3.8 3.7 8.4 0.45
fib_iter gen 3.8 3.8 8.4 0.45
files gen 3.8 3.8 8.4 0.45
control_flow gen 3.9 3.8 8.5 0.46
containers gen 28.7 28.6 49.2 0.58
varargs gen 5.5 5.5 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
classes gen 0 4 8 0.000
control_flow gen 0 4 12 0.000
files gen 0 0 16 0.000
loops gen 0 3 16 0.000
modules gen 0 2 8 0.000
tuple_return_value gen 0 4 12 0.000
gc_stack_roots gen 2 0 8 0.241
parse gen 4 0 12 0.323
cgi gen 4 4 12 0.335
containers gen 8 7 24 0.342
escape gen 8 4 20 0.410
fib_recursive gen 4 0 8 0.452
scoped_resource gen 4 12 8 0.498
varargs gen 33 62 51 0.649
length gen 8 4 8 0.951
cartesian gen 8 12 8 0.989
asdl_generated gen 4 4 4 1.004
fib_iter gen 0 0 0 NA
pea_hello gen NA NA 8 NA

raw benchmark files