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 14 124 0.000
modules gen 0 2 198 0.000
fib_iter gen 4 8 905 0.004
fib_recursive gen 11 11 893 0.012
loops gen 4 0 293 0.013
asdl_generated gen 5 11 386 0.014
parse gen 26 23 777 0.034
scoped_resource gen 36 41 1,047 0.034
files gen 4 8 75 0.049
tuple_return_value gen 14 11 183 0.077
classes gen 3 3 31 0.107
length gen 37 41 216 0.171
cartesian gen 76 86 334 0.229
escape gen 105 112 355 0.296
gc_stack_roots gen 2 2 4 0.463
cgi gen 256 263 536 0.478
varargs gen 24 16 32 0.769
control_flow gen 206 161 108 1.908
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.2 4.5 12.3 0.34
parse gen 3.7 3.8 9.1 0.40
gc_stack_roots gen 3.5 3.5 8.5 0.42
length gen 3.5 3.8 8.5 0.42
escape gen 3.5 3.7 8.4 0.42
cartesian gen 3.7 3.7 8.5 0.43
cgi gen 3.7 3.7 8.5 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
scoped_resource gen 3.7 3.8 8.4 0.44
loops gen 3.8 3.8 8.5 0.45
modules gen 3.8 3.7 8.5 0.45
control_flow gen 3.8 3.9 8.4 0.45
fib_recursive gen 3.8 3.8 8.4 0.45
files gen 3.8 3.7 8.4 0.45
fib_iter gen 3.8 3.7 8.3 0.46
tuple_return_value gen 3.9 3.7 8.4 0.47
containers gen 28.5 28.5 48.9 0.58
varargs gen 5.5 5.5 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 8 0.000
escape gen 0 4 8 0.000
fib_recursive gen 0 0 8 0.000
gc_stack_roots gen 0 0 15 0.000
loops gen 0 3 12 0.000
modules gen 2 0 8 0.222
tuple_return_value gen 5 7 16 0.296
control_flow gen 4 0 12 0.337
parse gen 4 4 12 0.362
files gen 4 0 8 0.438
asdl_generated gen 5 0 12 0.447
fib_iter gen 4 0 8 0.475
varargs gen 41 49 48 0.854
containers gen 15 0 16 0.938
scoped_resource gen 12 4 8 1.498
cartesian gen 16 0 8 2.000
length gen 8 4 4 2.056
cgi gen 12 4 4 2.958
pea_hello gen NA NA 9 NA

raw benchmark files