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
gc_stack_roots gen 0 2 8 0.000
modules gen 0 2 175 0.000
fib_iter gen 4 4 906 0.004
fib_recursive gen 11 11 881 0.012
loops gen 4 3 297 0.013
asdl_generated gen 11 11 374 0.029
parse gen 29 26 776 0.038
scoped_resource gen 47 42 1,026 0.046
files gen 4 7 67 0.056
containers gen 8 7 100 0.077
tuple_return_value gen 20 19 186 0.108
classes gen 3 3 23 0.141
length gen 45 36 207 0.216
cartesian gen 86 86 331 0.261
escape gen 109 101 345 0.316
cgi gen 260 257 514 0.507
varargs gen 19 23 20 0.977
control_flow gen 207 161 107 1.929

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

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 0 8 0.000
classes gen 0 0 8 0.000
control_flow gen 0 0 8 0.000
escape gen 0 8 8 0.000
fib_recursive gen 0 0 4 0.000
length gen 0 8 8 0.000
loops gen 0 0 4 0.000
parse gen 0 0 8 0.000
scoped_resource gen 0 4 8 0.000
tuple_return_value gen 0 0 8 0.000
containers gen 8 7 36 0.214
modules gen 2 0 8 0.221
gc_stack_roots gen 2 0 4 0.433
files gen 4 0 8 0.474
varargs gen 47 43 52 0.902
fib_iter gen 4 4 4 0.944
cartesian gen 4 0 4 1.030
cgi gen 8 12 4 2.011

raw benchmark files