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 10 0.000
fib_iter gen 8 8 917 0.008
modules gen 2 2 188 0.010
fib_recursive gen 11 11 894 0.012
loops gen 4 3 299 0.012
asdl_generated gen 11 11 397 0.027
parse gen 26 23 778 0.033
scoped_resource gen 39 45 1,038 0.038
files gen 4 4 72 0.051
containers gen 11 3 121 0.095
tuple_return_value gen 19 7 191 0.101
classes gen 3 3 27 0.122
length gen 40 48 212 0.190
escape gen 87 90 363 0.238
cartesian gen 83 78 334 0.250
cgi gen 265 256 518 0.512
varargs gen 29 16 28 1.035
control_flow gen 211 161 114 1.843
pea_hello gen NA NA 18 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
length gen 3.5 3.7 8.5 0.42
parse gen 3.8 3.9 9.1 0.42
fib_iter gen 3.5 3.8 8.4 0.42
gc_stack_roots gen 3.5 3.4 8.4 0.42
cgi gen 3.7 3.7 8.5 0.43
scoped_resource gen 3.7 3.7 8.5 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
cartesian gen 3.7 3.5 8.4 0.44
escape gen 3.7 3.7 8.4 0.44
tuple_return_value gen 3.7 3.8 8.4 0.44
modules gen 3.8 3.7 8.7 0.44
loops gen 3.8 3.8 8.5 0.45
control_flow gen 3.8 3.9 8.4 0.45
files gen 3.8 3.7 8.4 0.45
fib_recursive gen 3.9 3.8 8.4 0.47
containers gen 28.5 28.7 49.1 0.58
varargs gen 5.6 5.5 8.5 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
classes gen 0 0 12 0.000
control_flow gen 0 0 8 0.000
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 0 8 0.000
loops gen 0 0 12 0.000
modules gen 0 0 20 0.000
tuple_return_value gen 0 11 12 0.000
containers gen 4 10 24 0.159
gc_stack_roots gen 2 0 10 0.178
parse gen 4 4 16 0.271
files gen 4 4 12 0.303
cgi gen 4 12 12 0.336
length gen 4 0 8 0.502
cartesian gen 8 8 12 0.667
varargs gen 37 49 52 0.716
scoped_resource gen 8 0 8 0.986
escape gen 20 12 12 1.642
asdl_generated gen 0 0 0 NA
pea_hello gen NA NA 0 NA

raw benchmark files