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
classes gen 0 0 36 0.000
fib_iter gen 4 8 937 0.004
modules gen 2 2 198 0.009
fib_recursive gen 11 7 945 0.012
loops gen 5 3 303 0.015
containers gen 3 4 117 0.027
asdl_generated gen 11 7 388 0.028
parse gen 30 19 772 0.039
scoped_resource gen 48 46 1,021 0.047
tuple_return_value gen 12 18 195 0.059
files gen 7 4 69 0.108
gc_stack_roots gen 2 2 13 0.145
length gen 46 46 221 0.208
cartesian gen 91 84 334 0.272
escape gen 107 99 361 0.297
cgi gen 265 268 528 0.503
varargs gen 21 20 31 0.666
control_flow gen 202 158 115 1.751
pea_hello gen NA NA 8 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.3 4.5 12.3 0.35
asdl_generated gen 3.5 3.7 8.5 0.42
gc_stack_roots gen 3.5 3.5 8.4 0.42
cartesian gen 3.7 3.5 8.5 0.43
cgi gen 3.7 3.7 8.5 0.43
parse gen 3.9 3.8 9.1 0.43
escape gen 3.7 3.7 8.4 0.44
files gen 3.7 3.7 8.4 0.44
modules gen 3.8 3.8 8.5 0.45
scoped_resource gen 3.8 3.5 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
length gen 3.8 3.7 8.4 0.45
loops gen 3.8 3.9 8.4 0.45
fib_iter gen 3.9 3.7 8.4 0.47
tuple_return_value gen 3.9 3.8 8.4 0.47
containers gen 28.5 28.7 49.1 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
asdl_generated gen 0 4 4 0.000
cartesian gen 0 4 4 0.000
escape gen 0 4 4 0.000
fib_recursive gen 0 4 8 0.000
files gen 0 4 15 0.000
gc_stack_roots gen 0 0 8 0.000
loops gen 0 0 4 0.000
modules gen 0 0 12 0.000
parse gen 0 8 12 0.000
scoped_resource gen 0 0 12 0.000
containers gen 13 11 28 0.456
cgi gen 4 0 8 0.503
classes gen 3 3 4 0.811
varargs gen 45 49 50 0.902
fib_iter gen 4 0 4 0.949
tuple_return_value gen 8 0 8 0.967
control_flow gen 8 4 8 0.996
length gen 0 0 0 NA
pea_hello gen NA NA 11 NA

raw benchmark files