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
classes gen 0 3 23 0.000
fib_iter gen 8 4 889 0.008
modules gen 2 2 177 0.010
fib_recursive gen 11 7 879 0.012
loops gen 4 0 304 0.013
parse gen 17 27 774 0.022
asdl_generated gen 11 7 375 0.029
scoped_resource gen 47 46 1,063 0.044
files gen 4 7 65 0.057
containers gen 8 7 121 0.065
tuple_return_value gen 21 18 183 0.112
length gen 40 40 208 0.194
cartesian gen 93 87 326 0.284
escape gen 100 99 352 0.285
cgi gen 239 295 515 0.465
control_flow gen 209 157 115 1.822
varargs gen 29 12 12 2.404
gc_stack_roots gen 2 2 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.3 4.5 10.8 0.40
asdl_generated gen 3.3 3.5 6.9 0.47
gc_stack_roots gen 3.4 3.5 6.9 0.49
parse gen 3.8 3.9 7.5 0.51
scoped_resource gen 3.7 3.7 7.1 0.52
cartesian gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
files gen 3.7 3.7 6.9 0.53
length gen 3.7 3.7 6.9 0.53
cgi gen 3.8 3.7 7.1 0.54
fib_iter gen 3.8 3.5 6.9 0.55
fib_recursive gen 3.8 3.7 6.9 0.55
loops 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.8 6.9 0.55
control_flow gen 3.9 3.8 6.9 0.57
containers gen 28.7 28.3 47.6 0.60
varargs gen 5.5 5.6 6.9 0.79

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 0 12 0.000
fib_iter gen 0 4 12 0.000
fib_recursive gen 0 4 8 0.000
gc_stack_roots gen 0 0 12 0.000
modules gen 0 0 8 0.000
scoped_resource gen 0 0 12 0.000
tuple_return_value gen 0 0 8 0.000
files gen 4 0 11 0.326
classes gen 3 0 8 0.417
containers gen 8 7 16 0.490
varargs gen 37 53 60 0.618
escape gen 4 8 4 1.003
length gen 4 4 4 1.007
parse gen 13 0 4 3.149
cgi gen 16 4 4 3.973
control_flow gen 0 4 0 NA
loops gen 0 3 0 NA

raw benchmark files