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 895 0.008
modules gen 2 0 178 0.010
asdl_generated gen 4 7 373 0.010
fib_recursive gen 11 14 883 0.012
loops gen 4 0 299 0.014
parse gen 29 23 766 0.038
scoped_resource gen 48 46 1,037 0.046
containers gen 8 10 119 0.064
tuple_return_value gen 16 19 192 0.084
files gen 7 4 81 0.092
length gen 29 37 207 0.142
classes gen 3 3 23 0.145
gc_stack_roots gen 2 0 12 0.148
cartesian gen 86 70 327 0.262
escape gen 99 109 347 0.285
cgi gen 247 251 506 0.487
control_flow gen 212 162 108 1.962
varargs gen 25 23 0 inf

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.7 0.41
parse gen 3.7 3.9 7.6 0.48
gc_stack_roots gen 3.5 3.5 7.1 0.50
cgi gen 3.5 3.5 6.9 0.51
escape gen 3.7 3.8 7.1 0.52
loops gen 3.7 3.8 7.1 0.52
asdl_generated gen 3.7 3.7 6.9 0.53
cartesian gen 3.7 3.5 6.9 0.53
fib_iter gen 3.7 3.7 6.9 0.53
fib_recursive gen 3.7 3.7 6.9 0.53
length gen 3.7 3.9 6.9 0.53
scoped_resource gen 3.7 3.7 6.9 0.53
control_flow gen 3.8 3.8 6.9 0.55
files gen 3.8 3.7 6.9 0.55
modules gen 3.8 3.7 6.9 0.55
tuple_return_value gen 3.8 3.8 6.9 0.55
containers gen 28.5 28.6 47.6 0.60
varargs gen 5.4 5.6 6.9 0.77

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 0 8 0.000
control_flow gen 0 0 8 0.000
fib_recursive gen 0 0 12 0.000
loops gen 0 3 4 0.000
modules gen 0 2 4 0.000
parse gen 0 4 4 0.000
scoped_resource gen 0 0 4 0.000
containers gen 8 5 16 0.466
varargs gen 42 43 72 0.579
asdl_generated gen 8 4 12 0.627
escape gen 8 0 8 0.992
cgi gen 8 4 8 0.998
tuple_return_value gen 4 0 4 1.011
cartesian gen 8 16 4 1.927
length gen 15 8 4 3.687
fib_iter gen 0 0 0 NA
files gen 0 4 0 NA
gc_stack_roots gen 0 2 0 NA

raw benchmark files