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 5 0.000
modules gen 0 0 194 0.000
fib_iter gen 4 8 904 0.004
fib_recursive gen 11 11 887 0.012
loops gen 4 3 292 0.013
asdl_generated gen 11 4 379 0.028
parse gen 27 27 761 0.035
scoped_resource gen 40 38 1,036 0.039
tuple_return_value gen 12 18 196 0.059
containers gen 12 14 132 0.090
files gen 7 4 67 0.108
classes gen 3 0 30 0.109
length gen 40 45 209 0.191
cartesian gen 83 73 334 0.250
escape gen 97 94 355 0.274
varargs gen 12 21 32 0.388
cgi gen 254 263 521 0.488
control_flow gen 207 165 114 1.821
pea_hello gen NA NA 9 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.3 4.6 12.3 0.35
gc_stack_roots gen 3.5 3.7 8.4 0.42
cgi gen 3.7 3.7 8.5 0.43
escape gen 3.7 3.7 8.5 0.43
tuple_return_value gen 3.7 3.8 8.5 0.43
scoped_resource gen 3.7 3.7 8.4 0.44
parse gen 3.9 3.8 9.0 0.44
asdl_generated gen 3.8 3.5 8.5 0.45
loops gen 3.8 3.5 8.5 0.45
cartesian gen 3.8 3.5 8.4 0.45
control_flow gen 3.8 3.8 8.4 0.45
fib_iter gen 3.8 3.7 8.4 0.45
fib_recursive gen 3.8 3.7 8.4 0.45
length gen 3.8 3.7 8.4 0.45
modules gen 3.9 3.9 8.7 0.45
files gen 3.9 3.8 8.4 0.47
containers gen 28.6 28.5 49.1 0.58
varargs gen 5.5 5.5 8.5 0.65
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 7 8 0.000
cgi gen 0 4 8 0.000
classes gen 0 3 8 0.000
control_flow gen 0 0 8 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 4 16 0.000
loops gen 0 0 12 0.000
gc_stack_roots gen 2 0 15 0.124
fib_iter gen 4 0 12 0.316
parse gen 4 0 12 0.318
containers gen 4 0 12 0.329
modules gen 2 2 4 0.446
length gen 4 0 8 0.507
cartesian gen 8 12 8 0.998
scoped_resource gen 8 8 8 0.999
escape gen 8 8 8 1.015
varargs gen 53 45 48 1.120
tuple_return_value gen 8 0 4 1.921
pea_hello gen NA NA 9 NA

raw benchmark files