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
modules gen 2 2 192 0.011
fib_iter gen 12 10 1,020 0.011
fib_recursive gen 12 12 975 0.012
loops gen 5 0 334 0.016
asdl_generated gen 11 13 409 0.026
containers gen 4 9 136 0.032
parse gen 31 31 836 0.037
scoped_resource gen 50 52 1,139 0.044
tuple_return_value gen 24 22 209 0.114
files gen 9 6 74 0.120
classes gen 4 0 29 0.152
length gen 49 40 227 0.218
gc_stack_roots gen 2 0 10 0.237
cartesian gen 105 94 354 0.295
escape gen 112 106 379 0.296
varargs gen 8 29 20 0.392
cgi gen 290 292 556 0.522
control_flow gen 224 178 119 1.877

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.8 0.41
gc_stack_roots gen 3.4 3.5 6.9 0.49
fib_iter gen 3.5 3.8 7.1 0.50
cgi gen 3.5 3.7 6.9 0.51
parse gen 3.9 3.8 7.6 0.52
scoped_resource gen 3.7 3.7 7.1 0.52
asdl_generated gen 3.7 3.8 6.9 0.53
escape gen 3.7 3.5 6.9 0.53
length gen 3.7 3.5 6.9 0.53
modules gen 3.7 3.8 6.9 0.53
files gen 3.8 3.7 7.1 0.54
loops gen 3.8 3.8 7.1 0.54
cartesian gen 3.8 3.5 6.9 0.55
control_flow gen 3.8 3.8 6.9 0.55
tuple_return_value gen 3.8 3.7 6.9 0.55
fib_recursive gen 3.9 3.8 6.9 0.57
containers gen 28.5 28.7 47.6 0.60
varargs gen 5.6 5.4 7.1 0.80

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cartesian gen 0 4 8 0.000
classes gen 0 4 8 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 0 12 0.000
files gen 0 3 12 0.000
gc_stack_roots gen 0 2 5 0.000
length gen 0 12 8 0.000
modules gen 0 0 12 0.000
tuple_return_value gen 0 0 8 0.000
parse gen 4 0 20 0.195
asdl_generated gen 4 0 16 0.225
control_flow gen 4 0 8 0.503
containers gen 13 9 20 0.656
cgi gen 8 4 12 0.663
varargs gen 68 46 61 1.110
escape gen 8 12 4 2.009
scoped_resource gen 4 0 0 inf
loops gen 0 3 0 NA

raw benchmark files