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
containers gen 0 7 109 0.000
fib_iter gen 7 4 894 0.008
modules gen 2 2 170 0.010
fib_recursive gen 11 11 906 0.012
asdl_generated gen 5 11 416 0.013
loops gen 4 3 293 0.013
parse gen 25 19 749 0.033
scoped_resource gen 47 37 1,067 0.044
tuple_return_value gen 14 18 184 0.075
files gen 8 4 71 0.106
length gen 45 44 208 0.219
cartesian gen 88 75 362 0.244
escape gen 100 100 368 0.272
varargs gen 12 27 28 0.423
gc_stack_roots gen 2 0 4 0.439
cgi gen 265 262 512 0.518
control_flow gen 203 160 107 1.904

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.7 0.40
scoped_resource gen 3.5 3.7 7.1 0.50
parse gen 3.9 3.8 7.7 0.51
gc_stack_roots gen 3.5 3.4 6.8 0.52
loops gen 3.8 3.8 7.2 0.53
asdl_generated gen 3.7 3.7 6.9 0.53
cartesian gen 3.7 3.8 6.9 0.53
cgi gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
control_flow gen 3.8 3.7 7.1 0.54
fib_iter gen 3.8 3.8 7.1 0.54
tuple_return_value gen 3.8 3.8 7.1 0.54
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
modules gen 3.8 3.9 6.9 0.55
containers gen 28.6 28.7 47.5 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
fib_iter gen 0 4 8 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 4 4 0.000
gc_stack_roots gen 0 2 8 0.000
length gen 0 0 4 0.000
loops gen 0 0 4 0.000
modules gen 0 0 16 0.000
scoped_resource gen 0 8 4 0.000
parse gen 4 8 20 0.210
classes gen 3 0 12 0.278
cgi gen 4 8 8 0.503
control_flow gen 4 0 8 0.504
containers gen 16 7 28 0.554
tuple_return_value gen 7 0 8 0.862
escape gen 4 4 4 0.999
cartesian gen 4 12 4 1.009
varargs gen 55 39 44 1.256
asdl_generated gen 5 0 0 inf

raw benchmark files