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 15 116 0.000
gc_stack_roots gen 0 2 9 0.000
fib_iter gen 8 8 900 0.009
asdl_generated gen 4 7 381 0.010
modules gen 2 2 185 0.010
loops gen 3 3 299 0.012
fib_recursive gen 11 11 953 0.012
parse gen 27 23 783 0.034
scoped_resource gen 43 42 1,026 0.042
files gen 7 7 77 0.094
tuple_return_value gen 19 15 184 0.105
classes gen 3 0 27 0.117
length gen 40 42 213 0.189
cartesian gen 89 82 329 0.269
escape gen 98 103 354 0.277
cgi gen 261 253 517 0.505
varargs gen 16 19 24 0.689
control_flow gen 200 156 109 1.844
pea_hello gen NA NA 11 NA

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
parse gen 3.7 3.7 9.1 0.40
gc_stack_roots gen 3.4 3.4 8.4 0.41
cartesian gen 3.5 3.7 8.5 0.42
control_flow gen 3.7 3.8 8.5 0.43
escape gen 3.7 3.5 8.5 0.43
loops gen 3.7 3.8 8.5 0.43
scoped_resource gen 3.7 3.8 8.5 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
cgi gen 3.7 3.7 8.4 0.44
files gen 3.7 3.7 8.4 0.44
modules gen 3.8 3.8 8.7 0.44
fib_recursive gen 3.8 3.7 8.4 0.45
length gen 3.8 3.7 8.4 0.45
tuple_return_value gen 3.8 3.8 8.4 0.45
fib_iter gen 3.9 3.7 8.4 0.47
containers gen 28.6 28.5 49.2 0.58
varargs gen 5.6 5.5 8.5 0.66
pea_hello gen NA NA 8.3 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 3 12 0.000
fib_iter gen 0 0 4 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 0 8 0.000
loops gen 0 0 8 0.000
modules gen 0 0 12 0.000
tuple_return_value gen 0 4 12 0.000
gc_stack_roots gen 2 0 9 0.201
scoped_resource gen 4 4 12 0.361
parse gen 4 4 8 0.476
cartesian gen 4 4 8 0.502
containers gen 16 0 28 0.565
escape gen 8 0 12 0.649
control_flow gen 8 0 12 0.651
cgi gen 8 0 12 0.663
varargs gen 49 46 56 0.886
asdl_generated gen 7 4 8 0.917
length gen 4 4 4 1.002
pea_hello gen NA NA 7 NA

raw benchmark files