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
fib_iter gen 4 8 941 0.004
modules gen 2 2 191 0.010
fib_recursive gen 11 11 883 0.012
loops gen 4 0 297 0.012
asdl_generated gen 7 7 383 0.019
scoped_resource gen 33 42 1,048 0.032
containers gen 4 0 123 0.033
parse gen 31 27 791 0.039
tuple_return_value gen 12 18 191 0.060
classes gen 3 0 34 0.095
files gen 8 7 79 0.095
gc_stack_roots gen 2 2 15 0.116
length gen 41 45 215 0.191
cartesian gen 74 73 330 0.225
escape gen 101 94 355 0.286
cgi gen 265 264 525 0.505
varargs gen 12 21 24 0.515
control_flow gen 206 161 110 1.870
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.5 4.5 12.5 0.36
gc_stack_roots gen 3.4 3.4 8.5 0.40
asdl_generated gen 3.5 3.7 8.5 0.42
cartesian gen 3.5 3.7 8.5 0.42
parse gen 3.8 3.8 9.1 0.42
cgi gen 3.5 3.7 8.3 0.43
escape gen 3.7 3.7 8.5 0.43
fib_iter gen 3.7 3.8 8.5 0.43
loops gen 3.7 3.7 8.5 0.43
fib_recursive gen 3.7 3.8 8.4 0.44
length gen 3.7 3.8 8.4 0.44
files gen 3.8 3.7 8.5 0.45
scoped_resource gen 3.8 3.7 8.5 0.45
tuple_return_value gen 3.8 3.5 8.5 0.45
modules gen 3.9 3.8 8.7 0.45
control_flow gen 3.9 3.8 8.4 0.47
containers gen 28.4 28.5 48.9 0.58
varargs gen 5.5 5.5 8.5 0.65
pea_hello gen NA NA 8.0 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 3 4 0.000
fib_recursive gen 0 0 12 0.000
files gen 0 0 4 0.000
gc_stack_roots gen 0 0 4 0.000
loops gen 0 3 12 0.000
modules gen 0 0 8 0.000
parse gen 0 0 8 0.000
control_flow gen 4 0 12 0.336
asdl_generated gen 4 4 8 0.449
escape gen 4 8 8 0.489
length gen 4 0 8 0.516
containers gen 12 14 20 0.615
varargs gen 53 45 55 0.957
tuple_return_value gen 8 0 8 0.967
cgi gen 4 4 4 1.003
scoped_resource gen 15 4 12 1.234
cartesian gen 16 12 8 2.077
fib_iter gen 4 0 0 inf
pea_hello gen NA NA 9 NA

raw benchmark files