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 3 15 0.000
loops gen 0 3 300 0.000
fib_iter gen 4 4 890 0.004
modules gen 2 2 191 0.009
fib_recursive gen 11 11 880 0.012
asdl_generated gen 11 11 387 0.028
parse gen 30 27 782 0.039
scoped_resource gen 47 37 1,032 0.046
files gen 4 4 70 0.052
containers gen 9 7 104 0.088
tuple_return_value gen 19 18 200 0.096
gc_stack_roots gen 2 2 14 0.126
length gen 37 47 210 0.175
cartesian gen 91 79 335 0.272
escape gen 105 99 352 0.297
cgi gen 270 258 530 0.510
varargs gen 16 19 20 0.827
control_flow gen 206 165 109 1.892
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.3 12.3 0.36
gc_stack_roots gen 3.4 3.5 8.4 0.41
asdl_generated gen 3.5 3.7 8.5 0.42
modules gen 3.5 3.8 8.5 0.42
parse gen 3.8 3.9 9.0 0.42
escape gen 3.5 3.5 8.3 0.43
cartesian gen 3.7 3.5 8.4 0.44
cgi gen 3.7 3.5 8.4 0.44
control_flow gen 3.8 3.7 8.5 0.45
files gen 3.8 3.8 8.5 0.45
fib_recursive gen 3.8 3.7 8.4 0.45
loops gen 3.8 3.7 8.4 0.45
scoped_resource gen 3.8 3.8 8.4 0.45
tuple_return_value gen 3.8 3.7 8.4 0.45
fib_iter gen 3.8 3.5 8.3 0.46
length gen 3.9 3.7 8.4 0.47
containers gen 28.7 28.4 49.1 0.58
varargs gen 5.5 5.5 8.5 0.65
pea_hello gen NA NA 8.1 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 0 4 0.000
cartesian gen 0 8 8 0.000
control_flow gen 0 0 12 0.000
escape gen 0 4 4 0.000
fib_recursive gen 0 0 16 0.000
gc_stack_roots gen 0 0 5 0.000
modules gen 0 0 4 0.000
parse gen 0 0 8 0.000
scoped_resource gen 0 8 8 0.000
tuple_return_value gen 0 0 8 0.000
containers gen 5 7 36 0.127
classes gen 3 0 23 0.139
files gen 4 4 12 0.292
loops gen 4 0 12 0.310
fib_iter gen 4 4 12 0.318
cgi gen 4 8 12 0.332
varargs gen 49 46 60 0.827
length gen 8 0 8 1.030
pea_hello gen NA NA 7 NA

raw benchmark files