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
fib_iter gen 4 4 896 0.004
modules gen 2 0 195 0.009
fib_recursive gen 11 11 874 0.012
loops gen 4 3 293 0.012
asdl_generated gen 11 11 386 0.028
containers gen 4 4 111 0.034
parse gen 30 23 787 0.038
scoped_resource gen 44 45 1,019 0.043
files gen 7 4 81 0.089
tuple_return_value gen 19 18 189 0.102
classes gen 3 3 30 0.105
gc_stack_roots gen 2 2 16 0.110
length gen 45 38 212 0.214
escape gen 89 95 356 0.251
cartesian gen 87 74 338 0.258
cgi gen 269 273 529 0.508
varargs gen 24 20 20 1.225
control_flow gen 207 161 121 1.713
pea_hello gen NA NA 5 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.5 12.3 0.36
parse gen 3.8 3.8 9.1 0.42
gc_stack_roots gen 3.5 3.5 8.4 0.42
cartesian gen 3.7 3.5 8.5 0.43
cgi gen 3.7 3.7 8.4 0.44
control_flow gen 3.7 3.9 8.4 0.44
fib_iter gen 3.7 3.8 8.4 0.44
asdl_generated gen 3.8 3.5 8.5 0.45
files gen 3.8 3.8 8.5 0.45
loops gen 3.8 3.8 8.5 0.45
escape gen 3.8 3.7 8.4 0.45
fib_recursive gen 3.8 3.8 8.4 0.45
length gen 3.8 3.7 8.4 0.45
scoped_resource gen 3.8 3.5 8.4 0.45
tuple_return_value gen 3.8 3.7 8.4 0.45
modules gen 3.9 3.9 8.5 0.46
containers gen 28.6 28.5 49.1 0.58
varargs gen 5.4 5.4 8.5 0.63
pea_hello gen NA NA 8.1 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
asdl_generated gen 0 0 8 0.000
cgi gen 0 0 4 0.000
classes gen 0 0 9 0.000
fib_recursive gen 0 0 16 0.000
files gen 0 4 4 0.000
gc_stack_roots gen 0 0 4 0.000
loops gen 0 0 12 0.000
modules gen 0 2 12 0.000
parse gen 0 4 8 0.000
tuple_return_value gen 0 0 12 0.000
scoped_resource gen 4 0 20 0.201
cartesian gen 4 12 12 0.332
containers gen 11 11 32 0.359
fib_iter gen 4 4 8 0.474
varargs gen 40 44 59 0.681
length gen 4 8 4 0.943
escape gen 16 8 8 1.942
control_flow gen 0 0 0 NA
pea_hello gen NA NA 14 NA

raw benchmark files