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 8 0.000
modules gen 0 2 196 0.000
fib_iter gen 4 8 900 0.004
fib_recursive gen 7 11 884 0.008
loops gen 4 3 299 0.013
asdl_generated gen 7 8 396 0.019
scoped_resource gen 40 42 1,028 0.039
parse gen 31 23 781 0.039
tuple_return_value gen 19 15 200 0.096
files gen 7 7 76 0.098
containers gen 12 0 112 0.104
classes gen 3 0 30 0.107
length gen 34 45 215 0.161
cartesian gen 87 78 330 0.263
escape gen 97 96 350 0.278
varargs gen 23 19 48 0.479
cgi gen 263 267 527 0.499
control_flow gen 209 164 113 1.847
pea_hello gen NA NA 11 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.2 0.35
modules gen 3.5 3.8 8.5 0.42
cartesian gen 3.5 3.8 8.4 0.42
files gen 3.5 3.8 8.4 0.42
cgi gen 3.7 3.7 8.5 0.43
escape gen 3.7 3.7 8.5 0.43
fib_iter gen 3.7 3.8 8.5 0.43
asdl_generated gen 3.7 3.5 8.4 0.44
gc_stack_roots gen 3.7 3.4 8.4 0.44
parse gen 3.9 3.7 9.0 0.44
length gen 3.8 3.7 8.5 0.45
loops gen 3.8 3.7 8.5 0.45
scoped_resource gen 3.8 3.8 8.5 0.45
tuple_return_value gen 3.8 3.8 8.5 0.45
control_flow gen 3.8 3.8 8.4 0.45
fib_recursive gen 3.8 3.8 8.4 0.45
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.1 NA

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
classes gen 0 3 9 0.000
control_flow gen 0 0 12 0.000
files gen 0 0 8 0.000
loops gen 0 0 4 0.000
parse gen 0 4 16 0.000
containers gen 4 14 32 0.121
gc_stack_roots gen 2 0 12 0.147
modules gen 2 0 8 0.242
fib_recursive gen 4 0 12 0.301
asdl_generated gen 4 4 12 0.310
cartesian gen 4 8 12 0.346
scoped_resource gen 8 4 8 1.003
escape gen 8 8 8 1.020
varargs gen 43 46 32 1.316
length gen 11 0 4 2.837
cgi gen 8 0 0 inf
fib_iter gen 4 0 0 inf
pea_hello gen NA NA 8 NA
tuple_return_value gen 0 4 0 NA

raw benchmark files