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 298 0.000
fib_iter gen 8 4 888 0.009
modules gen 2 2 179 0.010
fib_recursive gen 11 11 882 0.012
asdl_generated gen 7 7 391 0.018
parse gen 26 22 768 0.033
scoped_resource gen 44 41 1,032 0.043
containers gen 12 4 134 0.088
files gen 7 0 72 0.103
tuple_return_value gen 21 15 189 0.109
classes gen 3 3 24 0.136
length gen 32 29 205 0.157
cartesian gen 83 80 328 0.253
escape gen 102 101 349 0.293
gc_stack_roots gen 2 0 4 0.435
cgi gen 266 246 506 0.526
varargs gen 12 21 15 0.767
control_flow gen 208 160 110 1.884

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 10.6 0.42
cartesian gen 3.5 3.7 6.9 0.51
gc_stack_roots gen 3.5 3.4 6.9 0.51
parse gen 3.9 3.8 7.6 0.52
asdl_generated gen 3.7 3.7 7.1 0.52
scoped_resource gen 3.7 3.7 7.1 0.52
cgi gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
length gen 3.7 3.7 6.9 0.53
modules gen 3.7 3.8 6.9 0.53
files gen 3.8 3.5 7.1 0.54
loops gen 3.8 3.8 7.1 0.54
fib_iter gen 3.8 3.8 6.9 0.55
fib_recursive gen 3.8 3.7 6.9 0.55
tuple_return_value gen 3.8 3.8 6.9 0.55
control_flow gen 3.9 3.9 6.9 0.57
containers gen 28.5 28.5 47.6 0.60
varargs gen 5.6 5.5 6.7 0.84

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 0 8 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 8 4 0.000
gc_stack_roots gen 0 2 8 0.000
modules gen 0 0 8 0.000
tuple_return_value gen 0 4 4 0.000
loops gen 4 0 8 0.483
containers gen 4 11 8 0.484
scoped_resource gen 4 4 8 0.500
cgi gen 4 8 8 0.506
escape gen 4 4 8 0.511
parse gen 4 4 8 0.533
asdl_generated gen 4 4 4 0.905
varargs gen 55 46 58 0.954
control_flow gen 4 0 4 0.978
cartesian gen 8 8 8 0.989
length gen 12 15 4 3.009
fib_iter gen 0 4 0 NA

raw benchmark files