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
files gen 0 7 73 0.000
gc_stack_roots gen 0 2 15 0.000
modules gen 0 0 189 0.000
fib_iter gen 8 8 898 0.008
fib_recursive gen 11 7 884 0.012
loops gen 4 3 299 0.012
asdl_generated gen 11 11 385 0.028
parse gen 30 22 769 0.039
scoped_resource gen 42 34 1,017 0.041
containers gen 8 11 126 0.061
tuple_return_value gen 14 15 190 0.076
classes gen 3 3 23 0.140
length gen 37 29 210 0.178
cartesian gen 87 82 327 0.267
escape gen 98 99 359 0.272
varargs gen 8 24 17 0.497
cgi gen 269 252 538 0.500
control_flow gen 206 165 107 1.937
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
parse gen 3.7 3.7 9.0 0.41
cartesian gen 3.5 3.7 8.5 0.42
gc_stack_roots gen 3.5 3.4 8.5 0.42
modules gen 3.7 3.8 8.7 0.42
asdl_generated gen 3.7 3.7 8.5 0.43
cgi gen 3.7 3.5 8.5 0.43
control_flow gen 3.7 3.8 8.5 0.43
escape gen 3.7 3.7 8.4 0.44
fib_iter gen 3.7 3.8 8.4 0.44
scoped_resource gen 3.7 3.8 8.4 0.44
tuple_return_value gen 3.7 3.8 8.3 0.44
files gen 3.8 3.8 8.5 0.45
length gen 3.8 3.7 8.5 0.45
loops gen 3.8 3.8 8.5 0.45
fib_recursive gen 3.8 3.8 8.4 0.45
containers gen 28.7 28.5 49.1 0.58
varargs gen 5.6 5.5 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
asdl_generated gen 0 0 4 0.000
classes gen 0 0 15 0.000
control_flow gen 0 4 16 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 4 8 0.000
loops gen 0 0 12 0.000
parse gen 0 4 16 0.000
modules gen 2 2 8 0.234
cartesian gen 4 4 12 0.331
gc_stack_roots gen 2 0 4 0.445
containers gen 8 4 16 0.486
tuple_return_value gen 5 4 8 0.593
files gen 7 0 12 0.633
scoped_resource gen 8 11 12 0.636
varargs gen 58 41 63 0.927
length gen 7 16 4 1.855
escape gen 8 4 0 inf
cgi gen 0 0 0 NA
pea_hello gen NA NA 4 NA

raw benchmark files