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 4 20 0.000
modules gen 0 0 194 0.000
fib_iter gen 8 8 894 0.008
fib_recursive gen 11 11 894 0.012
asdl_generated gen 5 11 401 0.013
loops gen 4 0 286 0.013
parse gen 30 27 775 0.038
scoped_resource gen 44 46 1,046 0.042
files gen 4 8 64 0.059
containers gen 8 10 112 0.068
tuple_return_value gen 14 15 188 0.072
length gen 40 41 199 0.203
cartesian gen 88 83 326 0.270
escape gen 97 95 348 0.277
gc_stack_roots gen 2 2 4 0.436
cgi gen 265 255 501 0.529
varargs gen 25 4 24 1.027
control_flow gen 214 155 107 1.999

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 10.7 0.41
parse gen 3.7 3.8 7.6 0.48
scoped_resource gen 3.5 3.7 7.1 0.50
cartesian gen 3.5 3.7 6.9 0.51
fib_iter gen 3.5 3.8 6.9 0.51
fib_recursive gen 3.5 3.8 6.9 0.51
gc_stack_roots gen 3.5 3.5 6.9 0.51
loops gen 3.7 3.7 7.1 0.52
tuple_return_value gen 3.7 3.7 7.1 0.52
control_flow gen 3.7 3.9 6.9 0.53
escape gen 3.7 3.5 6.9 0.53
cgi gen 3.5 3.5 6.7 0.53
files gen 3.8 3.8 7.1 0.54
modules gen 3.8 3.5 7.1 0.54
asdl_generated gen 3.8 3.7 6.9 0.55
length gen 3.8 3.8 6.9 0.55
containers gen 28.6 28.7 47.4 0.60
varargs gen 5.5 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
control_flow gen 0 4 8 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 0 8 0.000
gc_stack_roots gen 0 0 8 0.000
loops gen 0 3 8 0.000
parse gen 0 0 8 0.000
classes gen 3 0 12 0.275
files gen 4 0 12 0.314
containers gen 8 5 24 0.318
scoped_resource gen 4 0 12 0.335
cgi gen 4 0 12 0.336
length gen 4 4 12 0.338
modules gen 2 2 4 0.455
varargs gen 41 63 48 0.856
cartesian gen 4 4 4 0.994
escape gen 8 8 8 1.005
asdl_generated gen 5 0 4 1.348
tuple_return_value gen 7 4 4 1.702

raw benchmark files