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
fib_iter gen 8 8 936 0.008
modules gen 2 2 187 0.010
fib_recursive gen 11 11 892 0.012
loops gen 4 3 300 0.012
asdl_generated gen 11 5 387 0.028
parse gen 30 19 780 0.039
scoped_resource gen 41 38 1,027 0.040
containers gen 8 3 122 0.063
classes gen 3 3 34 0.092
files gen 7 7 76 0.097
tuple_return_value gen 19 18 194 0.099
length gen 38 38 211 0.181
cartesian gen 83 77 337 0.246
escape gen 98 104 349 0.281
cgi gen 265 252 524 0.505
varargs gen 16 12 16 0.974
control_flow gen 208 162 118 1.764
pea_hello gen NA NA 15 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.3 0.36
asdl_generated gen 3.5 3.7 8.4 0.42
parse gen 3.8 3.8 9.0 0.42
cartesian gen 3.5 3.7 8.3 0.43
fib_iter gen 3.7 3.8 8.5 0.43
cgi gen 3.7 3.5 8.4 0.44
control_flow gen 3.7 3.9 8.4 0.44
escape gen 3.7 3.7 8.4 0.44
fib_recursive gen 3.7 3.7 8.4 0.44
files gen 3.7 3.8 8.4 0.44
gc_stack_roots gen 3.7 3.4 8.4 0.44
scoped_resource gen 3.7 3.8 8.4 0.44
modules gen 3.8 3.7 8.5 0.45
length gen 3.8 3.7 8.4 0.45
loops gen 3.8 3.7 8.4 0.45
tuple_return_value gen 3.9 3.8 8.4 0.47
containers gen 28.4 28.6 49.2 0.58
varargs gen 5.4 5.4 8.4 0.64
pea_hello gen NA NA 8.3 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 5 8 0.000
classes gen 0 0 4 0.000
control_flow gen 0 0 4 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 0 12 0.000
files gen 0 0 8 0.000
loops gen 0 0 4 0.000
modules gen 0 0 8 0.000
parse gen 0 8 4 0.000
tuple_return_value gen 0 0 8 0.000
gc_stack_roots gen 2 0 12 0.156
containers gen 8 10 20 0.391
scoped_resource gen 8 8 16 0.508
varargs gen 50 55 64 0.791
length gen 8 8 8 0.959
escape gen 8 0 8 0.976
cgi gen 4 8 4 1.002
cartesian gen 8 8 4 1.992
pea_hello gen NA NA 4 NA

raw benchmark files