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
gc_stack_roots gen 0 2 19 0.000
fib_iter gen 4 8 894 0.004
modules gen 2 0 186 0.010
fib_recursive gen 11 11 879 0.012
loops gen 4 3 305 0.013
asdl_generated gen 7 11 379 0.019
parse gen 26 27 821 0.032
scoped_resource gen 47 46 1,033 0.046
files gen 4 4 75 0.049
containers gen 8 3 113 0.069
classes gen 3 3 34 0.093
tuple_return_value gen 19 18 187 0.103
length gen 40 41 213 0.189
varargs gen 8 8 36 0.230
cartesian gen 85 81 356 0.239
escape gen 101 99 359 0.283
cgi gen 261 267 523 0.500
control_flow gen 202 161 108 1.863
pea_hello gen NA NA 11 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.3 12.2 0.37
gc_stack_roots gen 3.4 3.4 8.4 0.41
loops gen 3.5 3.7 8.7 0.41
escape gen 3.5 3.7 8.4 0.42
cgi gen 3.5 3.7 8.3 0.43
modules gen 3.7 3.7 8.5 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
parse gen 3.9 3.7 9.0 0.44
cartesian gen 3.8 3.8 8.5 0.45
fib_recursive gen 3.8 3.9 8.5 0.45
files gen 3.8 3.8 8.5 0.45
scoped_resource gen 3.8 3.7 8.5 0.45
tuple_return_value gen 3.8 3.8 8.5 0.45
control_flow gen 3.8 3.9 8.4 0.45
length gen 3.8 3.7 8.4 0.45
fib_iter gen 3.8 3.8 8.3 0.46
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.3 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 0 4 0.000
fib_recursive gen 0 0 12 0.000
loops gen 0 0 4 0.000
modules gen 0 2 8 0.000
scoped_resource gen 0 0 8 0.000
tuple_return_value gen 0 0 12 0.000
containers gen 8 10 28 0.277
parse gen 4 0 12 0.316
control_flow gen 4 0 12 0.335
asdl_generated gen 4 0 8 0.462
files gen 4 4 8 0.462
fib_iter gen 4 0 8 0.476
escape gen 4 4 4 0.978
length gen 4 4 4 1.000
varargs gen 58 57 44 1.318
cgi gen 8 0 4 2.013
cartesian gen 8 8 4 2.026
gc_stack_roots gen 2 0 0 inf
pea_hello gen NA NA 7 NA

raw benchmark files