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 0 35 0.000
loops gen 0 3 307 0.000
fib_iter gen 8 8 900 0.008
modules gen 2 2 185 0.010
fib_recursive gen 11 11 883 0.012
asdl_generated gen 11 11 384 0.028
parse gen 24 27 790 0.031
scoped_resource gen 44 38 1,040 0.042
containers gen 8 7 102 0.076
files gen 7 7 80 0.090
tuple_return_value gen 20 19 196 0.103
gc_stack_roots gen 2 0 10 0.180
length gen 44 36 217 0.203
escape gen 93 103 362 0.256
cartesian gen 91 88 348 0.261
varargs gen 17 25 44 0.373
cgi gen 268 268 523 0.513
control_flow gen 206 157 114 1.813

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 12.3 0.36
gc_stack_roots gen 3.4 3.5 8.5 0.40
escape gen 3.5 3.5 8.5 0.42
cartesian gen 3.5 3.5 8.4 0.42
length gen 3.7 3.8 8.5 0.43
scoped_resource gen 3.7 3.8 8.5 0.43
parse gen 3.8 3.7 8.8 0.43
cgi gen 3.7 3.7 8.4 0.44
files gen 3.8 3.8 8.5 0.45
modules gen 3.8 3.7 8.5 0.45
tuple_return_value gen 3.8 3.7 8.5 0.45
asdl_generated gen 3.8 3.7 8.4 0.45
fib_iter gen 3.8 3.7 8.4 0.45
fib_recursive gen 3.8 3.7 8.4 0.45
loops gen 3.8 3.9 8.4 0.45
control_flow gen 3.9 3.8 8.4 0.47
containers gen 28.7 28.5 49.1 0.59
varargs gen 5.5 5.5 8.4 0.66

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 0 8 0.000
cartesian gen 0 0 4 0.000
cgi gen 0 0 8 0.000
fib_iter gen 0 0 4 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 0 4 0.000
gc_stack_roots gen 0 2 10 0.000
modules gen 0 0 8 0.000
tuple_return_value gen 0 0 4 0.000
containers gen 8 7 45 0.173
loops gen 4 0 8 0.463
scoped_resource gen 4 8 8 0.498
control_flow gen 4 4 8 0.506
parse gen 4 0 8 0.509
classes gen 3 3 4 0.823
varargs gen 50 41 36 1.369
escape gen 12 0 0 inf
length gen 0 8 0 NA

raw benchmark files