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 15 0.000
fib_iter gen 8 8 901 0.008
modules gen 2 2 187 0.010
fib_recursive gen 11 11 883 0.012
loops gen 4 3 296 0.012
asdl_generated gen 11 7 388 0.028
containers gen 4 4 123 0.031
parse gen 30 23 772 0.039
scoped_resource gen 44 29 1,070 0.041
tuple_return_value gen 16 18 193 0.081
files gen 7 4 84 0.088
classes gen 3 0 35 0.091
length gen 37 33 212 0.174
cartesian gen 83 82 333 0.250
escape gen 94 104 377 0.251
cgi gen 247 259 547 0.452
varargs gen 17 25 36 0.458
control_flow gen 203 161 127 1.601
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.5 0.36
parse gen 3.7 3.8 9.1 0.40
modules gen 3.5 3.7 8.5 0.42
cartesian gen 3.5 3.5 8.4 0.42
scoped_resource gen 3.7 3.7 8.5 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
cgi gen 3.7 3.5 8.4 0.44
gc_stack_roots gen 3.7 3.7 8.4 0.44
length gen 3.7 3.8 8.4 0.44
fib_recursive gen 3.8 3.7 8.5 0.45
tuple_return_value gen 3.8 3.8 8.5 0.45
escape gen 3.8 3.7 8.4 0.45
fib_iter gen 3.8 3.7 8.4 0.45
loops gen 3.8 3.9 8.4 0.45
control_flow gen 3.9 3.9 8.4 0.47
files gen 3.9 3.7 8.4 0.47
containers gen 28.5 28.5 49.1 0.58
varargs gen 5.5 5.6 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 4 0.000
classes gen 0 3 4 0.000
fib_iter gen 0 0 12 0.000
fib_recursive gen 0 0 12 0.000
loops gen 0 0 8 0.000
modules gen 0 0 12 0.000
parse gen 0 4 20 0.000
scoped_resource gen 4 16 12 0.335
gc_stack_roots gen 2 0 4 0.457
tuple_return_value gen 4 0 8 0.483
containers gen 11 11 20 0.577
cartesian gen 8 4 8 0.986
cgi gen 8 8 8 0.998
length gen 8 12 8 1.025
varargs gen 50 41 44 1.124
escape gen 12 0 8 1.489
control_flow gen 4 0 0 inf
files gen 0 4 0 NA
pea_hello gen NA NA 4 NA

raw benchmark files