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
fib_iter gen 4 4 891 0.004
fib_recursive gen 7 11 868 0.008
modules gen 2 2 180 0.010
loops gen 4 3 290 0.014
parse gen 21 19 757 0.028
asdl_generated gen 11 8 371 0.030
scoped_resource gen 44 46 1,024 0.043
containers gen 5 11 113 0.046
files gen 8 4 72 0.105
tuple_return_value gen 21 14 181 0.114
classes gen 3 0 24 0.136
length gen 45 40 200 0.223
cartesian gen 80 80 328 0.244
gc_stack_roots gen 2 2 6 0.298
escape gen 105 101 344 0.304
varargs gen 8 16 20 0.389
cgi gen 256 266 507 0.505
control_flow gen 209 159 103 2.029

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.6 0.42
parse gen 3.8 3.7 7.7 0.49
gc_stack_roots gen 3.5 3.5 7.1 0.50
cartesian gen 3.5 3.8 6.9 0.51
scoped_resource gen 3.7 3.7 7.1 0.52
tuple_return_value gen 3.7 3.8 7.1 0.52
asdl_generated gen 3.7 3.5 6.9 0.53
escape gen 3.7 3.7 6.9 0.53
modules gen 3.7 3.8 6.9 0.53
fib_iter gen 3.8 3.5 7.1 0.54
files gen 3.8 3.8 7.1 0.54
loops gen 3.8 3.8 7.1 0.54
cgi gen 3.7 3.8 6.8 0.54
fib_recursive gen 3.8 3.7 6.9 0.55
length gen 3.8 3.7 6.9 0.55
control_flow gen 3.9 3.8 7.1 0.56
containers gen 28.5 28.5 47.6 0.60
varargs gen 5.6 5.6 6.9 0.81

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 4 8 0.000
cgi gen 0 4 12 0.000
classes gen 0 3 8 0.000
control_flow gen 0 0 12 0.000
escape gen 0 4 8 0.000
files gen 0 4 4 0.000
gc_stack_roots gen 0 0 6 0.000
length gen 0 4 8 0.000
loops gen 0 0 8 0.000
modules gen 0 0 12 0.000
tuple_return_value gen 0 5 12 0.000
fib_recursive gen 4 0 16 0.226
scoped_resource gen 4 0 12 0.333
containers gen 10 4 24 0.429
fib_iter gen 4 4 4 0.953
parse gen 8 8 8 1.058
varargs gen 59 49 52 1.121
cartesian gen 12 8 8 1.502

raw benchmark files