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_iter gen 8 8 904 0.008
modules gen 2 2 179 0.011
fib_recursive gen 11 7 894 0.012
loops gen 4 0 298 0.013
asdl_generated gen 11 4 381 0.028
containers gen 4 7 111 0.035
parse gen 30 27 760 0.039
scoped_resource gen 48 46 1,036 0.046
files gen 4 4 73 0.050
tuple_return_value gen 21 15 188 0.109
classes gen 3 0 27 0.117
length gen 44 45 211 0.210
cartesian gen 85 83 327 0.260
escape gen 97 104 349 0.277
gc_stack_roots gen 2 2 4 0.455
cgi gen 269 264 513 0.524
varargs gen 21 16 20 1.050
control_flow gen 201 161 109 1.842

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 10.8 0.41
asdl_generated gen 3.4 3.7 6.9 0.49
gc_stack_roots gen 3.4 3.7 6.9 0.49
parse gen 3.8 3.8 7.6 0.50
escape gen 3.5 3.7 6.9 0.51
scoped_resource gen 3.7 3.8 7.1 0.52
loops gen 3.8 3.8 7.2 0.53
cartesian gen 3.7 3.7 6.9 0.53
cgi gen 3.7 3.7 6.9 0.53
fib_iter gen 3.8 3.8 7.1 0.54
files gen 3.8 3.9 6.9 0.55
length gen 3.8 3.8 6.9 0.55
modules gen 3.8 3.7 6.9 0.55
tuple_return_value gen 3.8 3.7 6.8 0.56
control_flow gen 3.9 3.7 6.9 0.57
fib_recursive gen 3.9 3.9 6.9 0.57
containers gen 28.6 28.5 47.6 0.60
varargs gen 5.6 5.4 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 7 4 0.000
cgi gen 0 4 8 0.000
classes gen 0 3 4 0.000
fib_recursive gen 0 4 4 0.000
gc_stack_roots gen 0 0 8 0.000
length gen 0 0 12 0.000
loops gen 0 3 8 0.000
modules gen 0 0 4 0.000
parse gen 0 0 8 0.000
scoped_resource gen 0 0 8 0.000
tuple_return_value gen 0 4 4 0.000
containers gen 12 7 32 0.372
control_flow gen 4 0 8 0.506
varargs gen 46 51 51 0.888
files gen 4 4 4 0.958
cartesian gen 8 4 8 0.971
escape gen 8 0 4 2.030
fib_iter gen 0 0 0 NA

raw benchmark files