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
fib_recursive gen 7 11 904 0.008
fib_iter gen 8 8 950 0.008
modules gen 2 2 186 0.010
loops gen 4 0 300 0.012
asdl_generated gen 11 7 386 0.028
scoped_resource gen 36 34 1,037 0.034
parse gen 30 23 777 0.039
tuple_return_value gen 15 18 198 0.078
containers gen 11 9 128 0.090
files gen 7 7 76 0.096
classes gen 4 3 31 0.117
length gen 41 47 215 0.191
gc_stack_roots gen 2 2 8 0.221
escape gen 96 100 352 0.274
cartesian gen 91 82 323 0.282
varargs gen 8 12 29 0.291
cgi gen 246 263 526 0.469
control_flow gen 208 162 110 1.894
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
gc_stack_roots gen 3.5 3.5 8.5 0.42
asdl_generated gen 3.7 3.7 8.5 0.43
control_flow gen 3.7 3.9 8.5 0.43
escape gen 3.7 3.5 8.5 0.43
modules gen 3.7 3.7 8.5 0.43
scoped_resource gen 3.7 3.5 8.5 0.43
parse gen 3.9 3.8 9.1 0.43
cartesian gen 3.7 3.5 8.4 0.44
cgi gen 3.7 3.5 8.4 0.44
loops gen 3.7 3.7 8.4 0.44
fib_recursive gen 3.8 3.8 8.5 0.45
fib_iter gen 3.8 3.5 8.4 0.45
files gen 3.8 3.8 8.4 0.45
length gen 3.8 3.8 8.4 0.45
tuple_return_value gen 3.8 3.8 8.4 0.45
containers gen 28.5 28.7 49.1 0.58
varargs gen 5.6 5.5 8.5 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 4 8 0.000
cartesian gen 0 4 12 0.000
classes gen 0 0 8 0.000
control_flow gen 0 0 12 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 3 4 0.000
modules gen 0 0 12 0.000
parse gen 0 4 12 0.000
containers gen 4 5 16 0.239
length gen 4 0 8 0.516
fib_recursive gen 4 0 4 0.902
escape gen 8 4 8 1.004
varargs gen 59 53 49 1.190
cgi gen 8 4 4 2.013
scoped_resource gen 12 11 4 2.976
tuple_return_value gen 4 0 0 inf
pea_hello gen NA NA 7 NA

raw benchmark files