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 31 0.000
fib_iter gen 8 4 880 0.009
modules gen 2 2 187 0.010
fib_recursive gen 11 7 895 0.012
loops gen 4 3 299 0.012
asdl_generated gen 11 11 385 0.028
parse gen 30 27 781 0.039
scoped_resource gen 43 42 1,028 0.042
files gen 4 4 79 0.047
containers gen 8 4 139 0.056
tuple_return_value gen 19 19 194 0.099
length gen 41 37 213 0.191
cartesian gen 75 78 335 0.223
escape gen 111 86 356 0.312
gc_stack_roots gen 2 2 4 0.430
cgi gen 260 259 514 0.507
varargs gen 19 19 28 0.684
control_flow gen 207 160 117 1.764
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.5 12.3 0.35
scoped_resource gen 3.5 3.7 8.5 0.42
gc_stack_roots gen 3.5 3.4 8.4 0.42
parse gen 3.9 3.7 9.2 0.43
asdl_generated gen 3.7 3.5 8.5 0.43
escape gen 3.7 3.5 8.5 0.43
modules gen 3.7 3.8 8.5 0.43
cgi gen 3.7 3.7 8.4 0.44
files gen 3.7 3.7 8.4 0.44
length gen 3.7 3.7 8.4 0.44
loops gen 3.7 3.8 8.4 0.44
tuple_return_value gen 3.7 3.7 8.4 0.44
control_flow gen 3.8 3.9 8.7 0.44
cartesian gen 3.8 3.7 8.5 0.45
fib_iter gen 3.8 3.8 8.5 0.45
fib_recursive gen 3.8 3.7 8.4 0.45
containers gen 28.6 28.4 48.9 0.58
varargs gen 5.5 5.5 8.4 0.66
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
escape gen 0 16 8 0.000
fib_iter gen 0 4 16 0.000
fib_recursive gen 0 4 8 0.000
gc_stack_roots gen 0 0 16 0.000
loops gen 0 0 8 0.000
modules gen 0 0 8 0.000
parse gen 0 0 12 0.000
tuple_return_value gen 0 0 4 0.000
scoped_resource gen 4 4 12 0.356
classes gen 3 3 8 0.429
cgi gen 8 8 12 0.670
varargs gen 46 46 52 0.885
files gen 4 4 4 0.931
length gen 4 8 4 1.013
containers gen 8 11 4 1.908
cartesian gen 17 8 8 2.056
pea_hello gen NA NA 9 NA

raw benchmark files