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 0 34 0.000
loops gen 0 0 296 0.000
modules gen 0 0 191 0.000
fib_recursive gen 7 11 883 0.008
fib_iter gen 8 8 901 0.008
asdl_generated gen 7 4 374 0.019
parse gen 30 19 787 0.038
scoped_resource gen 47 45 1,021 0.046
containers gen 8 9 114 0.067
files gen 7 8 79 0.092
tuple_return_value gen 19 18 194 0.099
gc_stack_roots gen 2 2 12 0.148
length gen 41 42 209 0.196
cartesian gen 80 82 337 0.236
escape gen 97 96 342 0.284
cgi gen 251 253 536 0.468
varargs gen 20 12 28 0.739
control_flow gen 208 158 120 1.732
pea_hello gen NA NA 9 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.3 4.5 12.3 0.35
parse gen 3.7 3.8 9.1 0.40
gc_stack_roots gen 3.4 3.7 8.4 0.41
asdl_generated gen 3.5 3.5 8.5 0.42
fib_recursive gen 3.5 3.7 8.5 0.42
cgi gen 3.5 3.7 8.4 0.42
modules gen 3.7 3.8 8.7 0.42
cartesian gen 3.7 3.5 8.5 0.43
escape gen 3.7 3.5 8.5 0.43
control_flow gen 3.8 3.9 8.5 0.45
files gen 3.8 3.8 8.5 0.45
loops gen 3.8 3.8 8.5 0.45
scoped_resource gen 3.8 3.7 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.7 8.4 0.45
containers gen 28.6 28.4 49.1 0.58
varargs gen 5.6 5.4 8.4 0.67
pea_hello gen NA NA 8.1 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
control_flow gen 0 4 4 0.000
fib_iter gen 0 0 4 0.000
files gen 0 0 4 0.000
gc_stack_roots gen 0 0 8 0.000
parse gen 0 8 4 0.000
scoped_resource gen 0 0 16 0.000
tuple_return_value gen 0 0 8 0.000
length gen 4 4 16 0.260
containers gen 8 5 29 0.268
asdl_generated gen 4 7 12 0.299
fib_recursive gen 4 0 12 0.302
modules gen 2 2 4 0.441
loops gen 4 3 8 0.463
escape gen 8 4 16 0.489
classes gen 3 3 4 0.851
varargs gen 45 53 51 0.875
cartesian gen 12 4 4 2.971
cgi gen 4 0 0 inf
pea_hello gen NA NA 9 NA

raw benchmark files