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 0 34 0.000
fib_iter gen 8 8 935 0.008
modules gen 2 2 201 0.010
fib_recursive gen 11 7 883 0.012
loops gen 4 3 294 0.012
asdl_generated gen 11 11 392 0.027
containers gen 4 7 123 0.032
parse gen 26 22 771 0.034
scoped_resource gen 47 42 1,018 0.046
tuple_return_value gen 15 11 191 0.080
gc_stack_roots gen 2 2 19 0.091
files gen 7 7 77 0.094
length gen 46 38 209 0.221
cartesian gen 79 74 354 0.224
varargs gen 8 16 28 0.276
escape gen 101 99 358 0.281
cgi gen 266 266 515 0.516
control_flow gen 208 161 120 1.734
pea_hello gen NA NA 7 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.7 3.8 9.1 0.40
gc_stack_roots gen 3.4 3.5 8.4 0.41
cartesian gen 3.5 3.7 8.5 0.42
cgi gen 3.5 3.7 8.5 0.42
escape gen 3.5 3.5 8.5 0.42
asdl_generated gen 3.5 3.7 8.4 0.42
modules gen 3.7 3.7 8.5 0.43
scoped_resource gen 3.7 3.5 8.5 0.43
control_flow gen 3.7 3.8 8.4 0.44
loops gen 3.7 3.8 8.4 0.44
fib_recursive gen 3.8 3.8 8.5 0.45
length gen 3.8 3.8 8.5 0.45
fib_iter gen 3.8 3.8 8.4 0.45
tuple_return_value gen 3.8 3.8 8.4 0.45
files gen 3.9 3.8 8.4 0.47
containers gen 28.7 28.7 49.2 0.58
varargs gen 5.5 5.6 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
asdl_generated gen 0 0 4 0.000
control_flow gen 0 0 4 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 4 8 0.000
files gen 0 0 8 0.000
length gen 0 8 8 0.000
loops gen 0 0 8 0.000
modules gen 0 0 8 0.000
scoped_resource gen 0 4 12 0.000
cgi gen 4 0 16 0.249
tuple_return_value gen 4 7 12 0.322
parse gen 4 4 12 0.360
containers gen 12 7 20 0.600
classes gen 3 3 4 0.763
escape gen 4 4 4 1.010
varargs gen 58 49 52 1.115
cartesian gen 12 12 8 1.481
gc_stack_roots gen 0 0 0 NA
pea_hello gen NA NA 11 NA

raw benchmark files