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 16 0.000
fib_iter gen 4 8 894 0.004
fib_recursive gen 7 7 889 0.008
modules gen 2 2 180 0.010
loops gen 4 3 304 0.012
asdl_generated gen 7 11 411 0.017
parse gen 26 27 780 0.034
scoped_resource gen 48 37 1,043 0.046
files gen 4 7 72 0.052
containers gen 10 9 107 0.098
classes gen 3 0 31 0.102
tuple_return_value gen 19 15 187 0.102
length gen 45 38 207 0.217
cartesian gen 83 74 341 0.244
escape gen 98 103 350 0.281
cgi gen 269 248 517 0.520
varargs gen 25 8 28 0.886
control_flow gen 206 158 109 1.889
pea_hello gen NA NA 8 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.3 0.36
parse gen 3.8 3.8 9.1 0.42
cartesian gen 3.5 3.8 8.4 0.42
gc_stack_roots gen 3.5 3.5 8.4 0.42
asdl_generated gen 3.7 3.7 8.5 0.43
escape gen 3.7 3.4 8.5 0.43
fib_recursive gen 3.7 3.4 8.5 0.43
scoped_resource gen 3.7 3.8 8.5 0.43
tuple_return_value gen 3.7 3.8 8.5 0.43
cgi gen 3.7 3.7 8.4 0.44
length gen 3.7 3.7 8.4 0.44
modules gen 3.8 3.7 8.5 0.45
control_flow gen 3.8 3.7 8.4 0.45
files gen 3.8 3.8 8.4 0.45
loops gen 3.8 3.8 8.4 0.45
fib_iter gen 3.9 3.7 8.4 0.47
containers gen 28.5 28.5 49.2 0.58
varargs gen 5.5 5.4 8.4 0.66
pea_hello gen NA NA 8.1 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
cgi gen 0 4 12 0.000
classes gen 0 3 8 0.000
length gen 0 8 12 0.000
loops gen 0 0 4 0.000
modules gen 0 0 16 0.000
scoped_resource gen 0 8 12 0.000
tuple_return_value gen 0 4 16 0.000
containers gen 5 5 36 0.147
files gen 4 0 12 0.310
control_flow gen 4 4 12 0.327
gc_stack_roots gen 2 0 4 0.426
fib_recursive gen 4 4 8 0.448
asdl_generated gen 4 0 8 0.449
parse gen 4 0 8 0.471
escape gen 8 0 12 0.659
cartesian gen 8 12 12 0.682
varargs gen 41 57 52 0.795
fib_iter gen 4 0 4 0.941
pea_hello gen NA NA 11 NA

raw benchmark files