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 12 0.000
fib_iter gen 8 8 885 0.009
modules gen 2 2 180 0.010
fib_recursive gen 11 11 878 0.012
loops gen 4 3 288 0.013
asdl_generated gen 11 7 381 0.028
parse gen 25 27 756 0.033
scoped_resource gen 48 42 1,030 0.047
containers gen 8 7 109 0.070
files gen 7 4 67 0.110
tuple_return_value gen 20 15 176 0.115
length gen 41 33 205 0.198
cartesian gen 78 62 345 0.226
escape gen 102 104 351 0.291
cgi gen 270 259 510 0.529
varargs gen 16 29 24 0.651
control_flow gen 213 157 116 1.837

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 10.9 0.40
gc_stack_roots gen 3.4 3.5 7.1 0.48
parse gen 3.8 3.8 7.6 0.50
cartesian gen 3.5 3.7 6.9 0.51
cgi gen 3.5 3.7 6.9 0.51
fib_recursive gen 3.7 3.7 7.1 0.52
scoped_resource gen 3.7 3.7 7.1 0.52
loops gen 3.8 3.9 7.2 0.53
asdl_generated gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.5 6.9 0.53
fib_iter gen 3.7 3.8 6.9 0.53
files gen 3.7 3.9 6.9 0.53
length gen 3.7 3.8 6.9 0.53
modules gen 3.7 3.8 6.9 0.53
control_flow gen 3.8 3.9 6.9 0.55
tuple_return_value gen 3.9 3.8 6.9 0.57
containers gen 28.5 28.5 47.6 0.60
varargs gen 5.5 5.5 7.1 0.78

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 4 4 0.000
cgi gen 0 8 8 0.000
fib_iter gen 0 0 12 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 4 8 0.000
loops gen 0 0 8 0.000
modules gen 0 0 4 0.000
scoped_resource gen 0 4 8 0.000
tuple_return_value gen 0 4 16 0.000
containers gen 8 7 28 0.272
parse gen 4 0 12 0.345
classes gen 3 0 8 0.414
length gen 4 12 8 0.460
escape gen 4 4 4 0.986
varargs gen 50 37 48 1.058
cartesian gen 12 23 8 1.553
gc_stack_roots gen 2 0 0 inf
control_flow gen 0 4 0 NA

raw benchmark files