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
containers gen 0 11 100 0.000
fib_iter gen 4 4 882 0.004
modules gen 2 2 180 0.012
fib_recursive gen 11 11 883 0.012
loops gen 4 3 290 0.013
asdl_generated gen 11 7 372 0.029
parse gen 30 23 772 0.038
scoped_resource gen 44 42 1,034 0.043
tuple_return_value gen 21 15 192 0.109
files gen 7 7 67 0.111
classes gen 4 3 27 0.137
length gen 45 41 202 0.224
cartesian gen 88 82 344 0.256
escape gen 95 101 347 0.274
cgi gen 256 256 517 0.495
gc_stack_roots gen 2 0 4 0.506
varargs gen 17 23 24 0.688
control_flow gen 209 161 118 1.769

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.7 0.41
parse gen 3.8 3.9 7.6 0.50
asdl_generated gen 3.5 3.7 6.9 0.51
cartesian gen 3.5 3.8 6.9 0.51
fib_recursive gen 3.5 3.7 6.9 0.51
gc_stack_roots gen 3.5 3.4 6.9 0.51
scoped_resource gen 3.7 3.5 7.1 0.52
control_flow gen 3.7 3.9 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
fib_iter gen 3.7 3.8 6.9 0.53
length gen 3.8 3.5 7.1 0.54
loops gen 3.8 3.8 7.1 0.54
cgi gen 3.7 3.8 6.8 0.54
files gen 3.8 3.8 6.9 0.55
modules gen 3.8 3.8 6.9 0.55
tuple_return_value gen 3.8 3.8 6.8 0.56
containers gen 28.6 28.5 47.5 0.60
varargs gen 5.5 5.5 7.1 0.78

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 4 8 0.000
classes gen 0 0 4 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 0 8 0.000
gc_stack_roots gen 0 2 8 0.000
length gen 0 4 8 0.000
loops gen 0 0 8 0.000
modules gen 0 0 4 0.000
parse gen 0 4 12 0.000
tuple_return_value gen 0 4 4 0.000
fib_iter gen 4 4 12 0.317
containers gen 16 4 36 0.436
scoped_resource gen 4 4 8 0.504
cartesian gen 4 8 4 1.002
varargs gen 50 43 48 1.033
escape gen 12 4 8 1.472
cgi gen 16 12 4 3.992
control_flow gen 0 0 0 NA

raw benchmark files