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
gc_stack_roots gen 0 0 8 0.000
modules gen 0 2 174 0.000
fib_iter gen 8 8 916 0.009
fib_recursive gen 11 7 881 0.012
loops gen 4 3 293 0.013
parse gen 18 27 791 0.023
asdl_generated gen 11 8 392 0.027
scoped_resource gen 32 41 1,016 0.031
containers gen 8 7 128 0.061
tuple_return_value gen 21 18 187 0.110
files gen 8 4 70 0.111
length gen 37 36 205 0.180
classes gen 3 0 15 0.208
cartesian gen 91 84 345 0.263
escape gen 99 101 344 0.289
cgi gen 269 264 511 0.527
varargs gen 23 16 20 1.159
control_flow gen 211 161 108 1.954

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.8 0.41
gc_stack_roots gen 3.4 3.5 6.9 0.49
parse gen 3.8 3.8 7.7 0.49
asdl_generated gen 3.7 3.7 7.1 0.52
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
escape gen 3.5 3.5 6.8 0.52
fib_iter gen 3.7 3.7 6.9 0.53
fib_recursive gen 3.7 3.8 6.9 0.53
modules gen 3.7 3.8 6.9 0.53
loops gen 3.8 3.7 7.1 0.54
files gen 3.8 3.7 6.9 0.55
length gen 3.8 3.8 6.9 0.55
tuple_return_value gen 3.8 3.9 6.9 0.55
control_flow gen 3.9 3.8 6.9 0.57
containers gen 28.5 28.7 47.5 0.60
varargs gen 5.6 5.5 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 4 4 0.000
cartesian gen 0 4 8 0.000
cgi gen 0 4 4 0.000
classes gen 0 3 15 0.000
control_flow gen 0 0 8 0.000
fib_iter gen 0 0 4 0.000
fib_recursive gen 0 4 12 0.000
files gen 0 4 8 0.000
loops gen 0 0 12 0.000
tuple_return_value gen 0 0 4 0.000
modules gen 2 0 12 0.153
gc_stack_roots gen 2 2 4 0.462
containers gen 8 7 12 0.654
varargs gen 43 49 52 0.817
length gen 7 8 8 0.920
parse gen 11 0 12 0.924
escape gen 4 4 4 0.994
scoped_resource gen 16 4 12 1.320

raw benchmark files