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 20 0.000
modules gen 0 2 170 0.000
fib_iter gen 8 8 891 0.009
fib_recursive gen 11 11 895 0.012
loops gen 4 3 289 0.014
asdl_generated gen 11 11 381 0.030
parse gen 26 33 789 0.032
scoped_resource gen 36 47 1,030 0.035
containers gen 10 0 125 0.080
files gen 7 4 67 0.110
tuple_return_value gen 21 15 177 0.116
length gen 34 33 195 0.173
cartesian gen 89 75 331 0.270
escape gen 101 104 346 0.291
varargs gen 8 19 19 0.387
cgi gen 262 247 518 0.506
control_flow gen 206 160 104 1.989
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.3 10.6 0.42
parse gen 3.8 3.7 7.7 0.49
asdl_generated gen 3.5 3.7 6.9 0.51
gc_stack_roots gen 3.5 3.4 6.9 0.51
cgi gen 3.7 3.7 7.1 0.52
scoped_resource gen 3.7 3.7 7.1 0.52
cartesian gen 3.5 3.5 6.8 0.52
loops gen 3.8 3.8 7.2 0.53
escape gen 3.7 3.7 6.9 0.53
fib_recursive gen 3.7 3.8 6.9 0.53
files gen 3.7 3.8 6.9 0.53
modules gen 3.7 3.9 6.9 0.53
tuple_return_value gen 3.8 3.7 7.1 0.54
length gen 3.8 3.7 6.9 0.55
control_flow gen 3.9 3.9 6.9 0.57
fib_iter gen 3.9 3.8 6.9 0.57
containers gen 28.7 28.9 47.6 0.60
varargs gen 5.5 5.4 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 0 4 0.000
fib_iter gen 0 0 8 0.000
files gen 0 4 13 0.000
gc_stack_roots gen 0 0 13 0.000
loops gen 0 0 12 0.000
tuple_return_value gen 0 4 16 0.000
modules gen 2 0 12 0.169
containers gen 5 16 20 0.247
classes gen 3 0 12 0.285
control_flow gen 4 0 12 0.338
parse gen 4 0 8 0.534
length gen 11 11 12 0.944
scoped_resource gen 12 0 12 0.995
escape gen 4 4 4 1.002
cgi gen 8 8 8 1.004
cartesian gen 8 12 8 1.018
varargs gen 60 47 54 1.106
fib_recursive gen 0 0 0 NA

raw benchmark files