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
containers gen 0 4 110 0.000
fib_iter gen 8 8 1,051 0.007
fib_recursive gen 7 11 889 0.008
modules gen 2 2 194 0.009
loops gen 4 3 304 0.012
asdl_generated gen 11 4 384 0.028
parse gen 30 27 779 0.039
scoped_resource gen 44 41 1,035 0.043
gc_stack_roots gen 2 2 19 0.090
tuple_return_value gen 19 18 194 0.099
files gen 8 7 75 0.103
classes gen 3 3 23 0.141
length gen 37 35 215 0.175
varargs gen 8 20 32 0.240
cartesian gen 88 74 329 0.266
escape gen 104 98 369 0.282
cgi gen 264 259 518 0.509
control_flow gen 207 147 123 1.680
pea_hello gen NA NA 12 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.5 0.36
gc_stack_roots gen 3.4 3.4 8.4 0.41
escape gen 3.5 3.5 8.5 0.42
parse gen 3.8 3.8 9.0 0.42
modules gen 3.7 3.8 8.7 0.42
asdl_generated gen 3.7 3.7 8.5 0.43
control_flow gen 3.7 3.8 8.5 0.43
cartesian gen 3.7 3.7 8.4 0.44
cgi gen 3.7 3.7 8.4 0.44
fib_recursive gen 3.7 3.7 8.4 0.44
files gen 3.7 3.8 8.4 0.44
length gen 3.7 3.8 8.4 0.44
scoped_resource gen 3.8 3.7 8.5 0.45
fib_iter gen 3.8 3.8 8.4 0.45
loops gen 3.8 3.8 8.4 0.45
tuple_return_value gen 3.8 3.7 8.4 0.45
containers gen 28.5 28.7 49.1 0.58
varargs gen 5.5 5.4 8.4 0.66
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 7 16 0.000
classes gen 0 0 15 0.000
fib_iter gen 0 0 8 0.000
files gen 0 0 8 0.000
loops gen 0 0 8 0.000
modules gen 0 0 12 0.000
parse gen 0 0 20 0.000
tuple_return_value gen 0 0 8 0.000
cartesian gen 4 12 16 0.251
scoped_resource gen 4 4 12 0.333
containers gen 15 11 33 0.466
cgi gen 4 8 8 0.502
escape gen 4 4 8 0.504
fib_recursive gen 4 0 4 0.906
varargs gen 58 45 48 1.203
length gen 7 12 4 1.885
control_flow gen 0 16 0 NA
gc_stack_roots gen 0 0 0 NA
pea_hello gen NA NA 8 NA

raw benchmark files