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 8 4 934 0.009
modules gen 2 0 185 0.010
loops gen 4 3 301 0.012
fib_recursive gen 11 11 890 0.013
asdl_generated gen 11 7 383 0.028
scoped_resource gen 39 41 1,038 0.038
parse gen 30 23 780 0.039
tuple_return_value gen 15 18 189 0.081
containers gen 12 0 136 0.085
files gen 7 4 85 0.085
classes gen 3 3 23 0.138
length gen 42 46 216 0.193
gc_stack_roots gen 2 2 8 0.223
cartesian gen 83 80 334 0.249
escape gen 106 94 352 0.300
cgi gen 269 265 517 0.519
varargs gen 23 12 20 1.157
control_flow gen 206 153 111 1.856
pea_hello gen NA NA 7 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.5 0.36
gc_stack_roots gen 3.4 3.4 8.4 0.41
cartesian gen 3.5 3.7 8.5 0.42
parse gen 3.8 3.8 9.0 0.42
asdl_generated gen 3.7 3.7 8.5 0.43
scoped_resource gen 3.7 3.7 8.5 0.43
cgi gen 3.7 3.7 8.4 0.44
escape gen 3.7 3.8 8.4 0.44
loops gen 3.8 3.8 8.7 0.44
modules gen 3.8 3.8 8.7 0.44
fib_recursive gen 3.8 3.8 8.5 0.45
files gen 3.8 3.8 8.5 0.45
fib_iter 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
control_flow gen 3.9 3.9 8.5 0.46
containers gen 28.7 28.5 49.1 0.58
varargs gen 5.5 5.5 8.4 0.66
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 4 8 0.000
cgi gen 0 4 12 0.000
classes gen 0 0 16 0.000
escape gen 0 12 8 0.000
fib_iter gen 0 4 8 0.000
fib_recursive gen 0 0 4 0.000
gc_stack_roots gen 0 0 12 0.000
loops gen 0 0 4 0.000
modules gen 0 2 12 0.000
parse gen 0 4 8 0.000
tuple_return_value gen 4 0 12 0.318
control_flow gen 4 8 12 0.333
containers gen 4 14 8 0.483
length gen 4 0 8 0.520
varargs gen 42 53 60 0.707
cartesian gen 8 8 4 1.965
scoped_resource gen 8 4 4 1.966
files gen 0 4 0 NA
pea_hello gen NA NA 11 NA

raw benchmark files