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 8 8 900 0.008
modules gen 2 0 199 0.009
loops gen 4 3 304 0.012
fib_recursive gen 11 11 884 0.012
asdl_generated gen 7 7 406 0.018
parse gen 27 19 790 0.034
scoped_resource gen 43 37 1,044 0.042
containers gen 8 4 112 0.067
tuple_return_value gen 14 11 194 0.075
classes gen 3 3 36 0.087
files gen 7 7 72 0.099
gc_stack_roots gen 2 0 12 0.151
length gen 45 42 210 0.217
cartesian gen 83 86 329 0.254
escape gen 105 104 358 0.292
varargs gen 16 16 51 0.319
cgi gen 260 259 527 0.494
control_flow gen 204 161 115 1.776
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.3 0.36
cartesian gen 3.5 3.7 8.5 0.42
escape gen 3.5 3.7 8.4 0.42
gc_stack_roots gen 3.5 3.4 8.4 0.42
asdl_generated gen 3.7 3.7 8.5 0.43
cgi gen 3.7 3.5 8.5 0.43
modules gen 3.7 3.8 8.5 0.43
fib_iter gen 3.7 3.7 8.4 0.44
length gen 3.7 3.8 8.4 0.44
tuple_return_value gen 3.7 3.7 8.4 0.44
parse gen 3.9 3.8 9.0 0.44
control_flow gen 3.8 3.8 8.7 0.44
files gen 3.8 3.7 8.5 0.45
loops gen 3.8 3.8 8.4 0.45
scoped_resource gen 3.8 3.7 8.4 0.45
fib_recursive gen 3.8 3.8 8.3 0.46
containers gen 28.5 28.7 49.1 0.58
varargs gen 5.4 5.5 8.5 0.63
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 4 0.000
escape gen 0 0 8 0.000
fib_iter gen 0 0 12 0.000
fib_recursive gen 0 0 4 0.000
files gen 0 0 12 0.000
gc_stack_roots gen 0 2 8 0.000
length gen 0 4 4 0.000
loops gen 0 0 8 0.000
modules gen 0 2 4 0.000
containers gen 8 11 28 0.268
asdl_generated gen 4 4 8 0.446
parse gen 4 8 8 0.473
control_flow gen 4 0 8 0.505
tuple_return_value gen 5 7 8 0.611
scoped_resource gen 4 8 4 0.987
cartesian gen 8 0 8 1.003
cgi gen 8 8 8 1.004
varargs gen 49 49 28 1.775
pea_hello gen NA NA 9 NA

raw benchmark files