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
containers gen 0 5 107 0.000
fib_iter gen 8 8 931 0.008
modules gen 2 2 183 0.009
fib_recursive gen 11 7 893 0.012
loops gen 4 3 304 0.013
asdl_generated gen 7 7 382 0.019
parse gen 27 27 767 0.035
scoped_resource gen 48 33 1,032 0.047
files gen 4 7 75 0.051
tuple_return_value gen 10 11 189 0.051
classes gen 3 3 26 0.130
length gen 38 46 206 0.183
cartesian gen 77 87 342 0.224
escape gen 98 103 355 0.276
gc_stack_roots gen 2 2 4 0.462
cgi gen 248 263 516 0.480
varargs gen 25 8 32 0.772
control_flow gen 205 162 110 1.859
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.2 0.37
gc_stack_roots gen 3.4 3.4 8.5 0.40
escape gen 3.5 3.7 8.5 0.42
modules gen 3.5 3.9 8.5 0.42
parse gen 3.8 3.8 9.1 0.42
cgi gen 3.7 3.7 8.5 0.43
scoped_resource gen 3.7 3.7 8.5 0.43
asdl_generated gen 3.7 3.5 8.4 0.44
cartesian gen 3.7 3.7 8.4 0.44
fib_iter gen 3.7 3.8 8.4 0.44
loops gen 3.7 3.8 8.4 0.44
control_flow gen 3.8 3.9 8.7 0.44
length gen 3.8 3.8 8.5 0.45
fib_recursive gen 3.8 3.7 8.4 0.45
files gen 3.8 3.7 8.4 0.45
tuple_return_value gen 3.8 3.8 8.4 0.45
containers gen 28.4 28.7 49.1 0.58
varargs gen 5.5 5.6 8.5 0.65
pea_hello gen NA NA 8.1 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 0 13 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 4 12 0.000
gc_stack_roots gen 0 0 15 0.000
loops gen 0 0 8 0.000
modules gen 0 0 12 0.000
scoped_resource gen 0 12 4 0.000
parse gen 4 0 20 0.190
control_flow gen 4 0 12 0.340
containers gen 15 9 36 0.431
asdl_generated gen 4 4 8 0.454
files gen 4 0 8 0.483
cgi gen 8 4 16 0.503
tuple_return_value gen 10 7 12 0.813
varargs gen 41 57 48 0.858
length gen 8 0 8 0.951
escape gen 8 0 8 1.023
cartesian gen 16 0 0 inf
pea_hello gen NA NA 9 NA

raw benchmark files