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 0 2 170 0.000
fib_iter gen 8 7 889 0.008
fib_recursive gen 11 7 945 0.011
loops gen 4 3 291 0.013
asdl_generated gen 11 7 392 0.028
parse gen 29 27 775 0.037
scoped_resource gen 43 46 1,034 0.042
containers gen 8 9 113 0.067
tuple_return_value gen 21 18 194 0.106
files gen 8 7 72 0.106
classes gen 3 3 19 0.166
length gen 40 44 198 0.204
gc_stack_roots gen 2 2 8 0.220
cartesian gen 92 78 328 0.281
escape gen 101 100 355 0.285
cgi gen 265 261 506 0.524
varargs gen 24 12 20 1.188
control_flow gen 203 157 102 1.986

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

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 4 4 0.000
cartesian gen 0 8 8 0.000
classes gen 0 0 11 0.000
fib_iter gen 0 0 8 0.000
files gen 0 0 4 0.000
gc_stack_roots gen 0 0 4 0.000
loops gen 0 0 8 0.000
parse gen 0 0 4 0.000
modules gen 2 0 12 0.150
cgi gen 4 8 12 0.331
length gen 4 0 12 0.340
containers gen 8 5 20 0.376
control_flow gen 8 4 12 0.675
varargs gen 44 55 52 0.838
scoped_resource gen 4 0 4 0.978
escape gen 4 4 0 inf
fib_recursive gen 0 4 0 NA
tuple_return_value gen 0 0 0 NA

raw benchmark files