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 8 0.000
fib_recursive gen 7 7 880 0.008
fib_iter gen 8 8 895 0.009
modules gen 2 2 178 0.010
loops gen 4 3 287 0.014
parse gen 22 22 784 0.028
asdl_generated gen 11 7 372 0.029
scoped_resource gen 44 30 1,042 0.042
files gen 7 8 71 0.104
tuple_return_value gen 20 15 190 0.106
containers gen 15 10 112 0.138
classes gen 3 3 22 0.146
length gen 44 45 216 0.205
cartesian gen 85 89 326 0.260
escape gen 100 103 344 0.292
cgi gen 247 268 510 0.485
varargs gen 20 8 25 0.778
control_flow gen 204 161 107 1.916

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.9 0.41
modules gen 3.5 3.8 6.9 0.51
parse gen 3.9 3.8 7.6 0.52
scoped_resource gen 3.7 3.7 7.1 0.52
asdl_generated gen 3.7 3.5 6.9 0.53
cartesian gen 3.7 3.5 6.9 0.53
cgi gen 3.7 3.7 6.9 0.53
escape gen 3.7 3.8 6.9 0.53
gc_stack_roots gen 3.7 3.4 6.9 0.53
tuple_return_value gen 3.7 3.7 6.9 0.53
control_flow gen 3.8 3.9 7.1 0.54
fib_iter gen 3.8 3.8 7.1 0.54
length gen 3.8 3.8 7.1 0.54
fib_recursive gen 3.8 3.5 6.9 0.55
files gen 3.8 3.8 6.9 0.55
loops gen 3.8 3.8 6.9 0.55
containers gen 28.7 28.7 47.6 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
asdl_generated gen 0 4 4 0.000
classes gen 0 0 9 0.000
containers gen 0 5 24 0.000
files gen 0 0 4 0.000
length gen 0 0 4 0.000
loops gen 0 0 8 0.000
modules gen 0 0 4 0.000
tuple_return_value gen 0 4 4 0.000
fib_recursive gen 4 4 8 0.448
gc_stack_roots gen 2 0 4 0.451
escape gen 4 0 8 0.496
scoped_resource gen 4 15 8 0.501
control_flow gen 4 0 8 0.507
cgi gen 8 0 12 0.667
varargs gen 47 58 46 1.019
parse gen 7 4 4 1.820
cartesian gen 8 0 4 2.003
fib_iter gen 0 0 0 NA

raw benchmark files