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 16 0.000
fib_iter gen 8 4 901 0.008
modules gen 2 2 196 0.010
fib_recursive gen 11 11 882 0.012
loops gen 4 3 301 0.013
asdl_generated gen 11 6 391 0.027
parse gen 30 22 763 0.040
scoped_resource gen 44 45 1,048 0.042
tuple_return_value gen 15 15 196 0.079
containers gen 10 5 123 0.083
files gen 7 8 72 0.101
classes gen 3 3 28 0.115
length gen 41 42 212 0.193
cartesian gen 83 86 344 0.242
escape gen 92 95 363 0.253
cgi gen 271 252 522 0.518
varargs gen 16 12 23 0.711
control_flow gen 211 156 115 1.842
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.3 12.3 0.36
scoped_resource gen 3.4 3.8 8.5 0.40
gc_stack_roots gen 3.4 3.4 8.4 0.41
cartesian gen 3.5 3.5 8.5 0.42
parse gen 3.8 3.9 9.1 0.42
asdl_generated gen 3.7 3.5 8.5 0.43
escape gen 3.7 3.5 8.5 0.43
cgi gen 3.7 3.7 8.4 0.44
fib_iter gen 3.8 3.8 8.5 0.45
length gen 3.8 3.9 8.5 0.45
loops gen 3.8 3.8 8.5 0.45
files gen 3.8 3.4 8.4 0.45
tuple_return_value gen 3.8 3.7 8.4 0.45
control_flow gen 3.9 3.9 8.5 0.46
fib_recursive gen 3.9 3.7 8.5 0.46
modules gen 3.9 3.7 8.5 0.46
containers gen 28.5 28.6 49.1 0.58
varargs gen 5.4 5.5 8.5 0.63
pea_hello gen NA NA 8.3 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cgi gen 0 0 8 0.000
classes gen 0 0 12 0.000
control_flow gen 0 8 8 0.000
fib_iter gen 0 4 8 0.000
fib_recursive gen 0 0 12 0.000
files gen 0 0 12 0.000
loops gen 0 0 4 0.000
modules gen 0 0 4 0.000
parse gen 0 4 16 0.000
containers gen 5 9 20 0.257
scoped_resource gen 4 0 12 0.333
gc_stack_roots gen 2 0 4 0.433
varargs gen 49 54 58 0.854
tuple_return_value gen 4 4 4 0.964
cartesian gen 8 0 8 0.991
length gen 4 4 4 1.023
escape gen 12 8 0 inf
asdl_generated gen 0 6 0 NA
pea_hello gen NA NA 4 NA

raw benchmark files