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 3 23 0.000
gc_stack_roots gen 0 2 8 0.000
modules gen 0 2 183 0.000
fib_iter gen 8 8 893 0.008
asdl_generated gen 4 11 420 0.009
fib_recursive gen 11 11 894 0.012
loops gen 4 3 305 0.012
scoped_resource gen 35 41 1,034 0.034
parse gen 29 23 799 0.036
tuple_return_value gen 17 19 186 0.091
files gen 7 7 73 0.099
containers gen 16 4 105 0.147
length gen 36 40 212 0.171
cartesian gen 83 78 339 0.246
escape gen 101 103 357 0.283
cgi gen 269 249 525 0.513
varargs gen 20 23 32 0.635
control_flow gen 207 148 115 1.795

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
gc_stack_roots gen 3.4 3.5 8.5 0.40
asdl_generated gen 3.5 3.5 8.4 0.42
escape gen 3.5 3.5 8.4 0.42
cgi gen 3.7 3.7 8.5 0.43
files gen 3.7 3.7 8.5 0.43
scoped_resource gen 3.7 3.7 8.4 0.44
tuple_return_value gen 3.7 3.8 8.4 0.44
parse gen 3.9 3.8 9.0 0.44
control_flow gen 3.8 3.8 8.5 0.45
fib_iter gen 3.8 3.7 8.5 0.45
fib_recursive gen 3.8 3.8 8.5 0.45
modules gen 3.8 3.8 8.5 0.45
cartesian gen 3.8 3.5 8.4 0.45
loops gen 3.8 3.9 8.4 0.45
length gen 3.8 3.8 8.3 0.46
containers gen 28.7 28.5 49.1 0.58
varargs gen 5.5 5.5 8.4 0.66

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cgi gen 0 4 8 0.000
containers gen 0 11 36 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 0 4 0.000
files gen 0 0 12 0.000
loops gen 0 0 4 0.000
gc_stack_roots gen 2 0 12 0.152
classes gen 3 0 16 0.207
modules gen 2 0 8 0.229
tuple_return_value gen 3 0 12 0.284
cartesian gen 8 8 16 0.497
control_flow gen 4 16 8 0.500
escape gen 4 0 8 0.503
scoped_resource gen 12 4 16 0.736
varargs gen 44 43 48 0.931
asdl_generated gen 7 0 4 1.797
length gen 8 4 4 2.019
parse gen 0 4 0 NA

raw benchmark files