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 24 0.000
fib_iter gen 8 8 885 0.009
modules gen 2 2 171 0.010
fib_recursive gen 11 11 878 0.012
loops gen 4 0 289 0.014
asdl_generated gen 7 11 375 0.019
scoped_resource gen 31 42 1,055 0.030
containers gen 4 10 125 0.032
parse gen 29 24 793 0.037
files gen 7 8 73 0.101
tuple_return_value gen 22 11 189 0.116
length gen 37 37 205 0.181
cartesian gen 87 72 327 0.267
escape gen 104 101 338 0.308
gc_stack_roots gen 2 2 4 0.452
cgi gen 271 260 518 0.523
varargs gen 27 16 16 1.712
control_flow gen 207 161 105 1.962

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.6 10.8 0.41
escape gen 3.4 3.4 6.9 0.49
parse gen 3.8 3.9 7.6 0.50
cartesian gen 3.5 3.7 6.9 0.51
gc_stack_roots gen 3.5 3.4 6.9 0.51
asdl_generated gen 3.7 3.7 7.1 0.52
cgi 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
tuple_return_value gen 3.7 3.7 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
scoped_resource gen 3.8 3.8 7.1 0.54
fib_recursive gen 3.7 3.8 6.8 0.54
fib_iter gen 3.8 3.8 6.9 0.55
modules 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.5 47.8 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
cgi gen 0 8 4 0.000
escape gen 0 0 8 0.000
fib_iter gen 0 0 12 0.000
fib_recursive gen 0 0 12 0.000
files gen 0 0 4 0.000
gc_stack_roots gen 0 0 8 0.000
loops gen 0 3 12 0.000
modules gen 0 0 12 0.000
parse gen 0 4 8 0.000
classes gen 3 0 8 0.417
control_flow gen 4 0 8 0.509
varargs gen 39 56 56 0.699
asdl_generated gen 4 0 4 0.900
cartesian gen 4 16 4 0.996
containers gen 12 5 12 1.001
tuple_return_value gen 4 7 4 1.087
length gen 8 8 4 2.046
scoped_resource gen 16 4 4 3.934

raw benchmark files