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 17 0.000
fib_recursive gen 7 7 897 0.008
fib_iter gen 8 8 891 0.009
modules gen 2 2 179 0.010
loops gen 4 3 296 0.013
asdl_generated gen 7 11 370 0.019
scoped_resource gen 36 45 1,032 0.035
parse gen 29 27 768 0.038
files gen 4 7 64 0.058
containers gen 8 5 116 0.066
tuple_return_value gen 21 18 181 0.114
length gen 36 45 200 0.181
cartesian gen 94 79 327 0.286
escape gen 101 108 346 0.290
cgi gen 265 256 503 0.527
varargs gen 16 12 20 0.828
control_flow gen 210 161 106 1.981
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.5 4.5 10.7 0.41
parse gen 3.8 3.9 7.6 0.50
gc_stack_roots gen 3.5 3.4 6.9 0.51
modules gen 3.5 3.8 6.9 0.51
tuple_return_value gen 3.5 3.8 6.9 0.51
cgi gen 3.7 3.5 6.9 0.53
control_flow gen 3.7 3.9 6.9 0.53
escape gen 3.7 3.5 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
scoped_resource gen 3.8 3.7 7.1 0.54
asdl_generated gen 3.8 3.5 6.9 0.55
cartesian gen 3.8 3.7 6.9 0.55
fib_iter gen 3.8 3.7 6.9 0.55
fib_recursive gen 3.8 3.7 6.9 0.55
files gen 3.8 3.8 6.9 0.55
length gen 3.8 3.8 6.9 0.55
containers gen 28.6 28.6 47.6 0.60
varargs gen 5.5 5.6 7.1 0.78

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cartesian gen 0 8 8 0.000
control_flow gen 0 0 8 0.000
fib_iter gen 0 0 4 0.000
gc_stack_roots gen 0 0 12 0.000
loops gen 0 0 4 0.000
modules gen 0 0 4 0.000
parse gen 0 0 4 0.000
tuple_return_value gen 0 0 12 0.000
classes gen 3 0 13 0.244
files gen 4 0 12 0.309
containers gen 8 10 20 0.385
cgi gen 4 0 8 0.503
escape gen 4 4 8 0.505
asdl_generated gen 4 0 4 0.896
fib_recursive gen 4 4 4 0.898
varargs gen 49 53 52 0.955
length gen 8 0 8 1.004
scoped_resource gen 12 0 4 2.977

raw benchmark files