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
modules gen 0 2 189 0.000
fib_iter gen 4 8 893 0.004
fib_recursive gen 7 10 880 0.008
loops gen 4 3 296 0.012
asdl_generated gen 11 11 383 0.028
parse gen 25 27 777 0.032
scoped_resource gen 40 38 1,046 0.038
files gen 4 7 80 0.045
containers gen 10 3 117 0.085
tuple_return_value gen 19 15 183 0.105
length gen 37 42 206 0.178
classes gen 3 3 17 0.185
cartesian gen 79 80 336 0.235
escape gen 97 95 339 0.287
gc_stack_roots gen 2 2 4 0.418
cgi gen 264 247 531 0.497
varargs gen 19 15 24 0.812
control_flow gen 201 163 114 1.764
pea_hello gen NA NA 14 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.4 0.35
parse gen 3.7 3.8 9.1 0.40
cartesian gen 3.5 3.5 8.4 0.42
gc_stack_roots gen 3.5 3.5 8.4 0.42
fib_recursive gen 3.5 3.8 8.3 0.43
asdl_generated gen 3.7 3.7 8.5 0.43
cgi gen 3.7 3.5 8.5 0.43
length gen 3.7 3.8 8.5 0.43
escape gen 3.7 3.7 8.4 0.44
files gen 3.7 3.7 8.4 0.44
loops gen 3.7 3.8 8.4 0.44
modules gen 3.8 3.9 8.7 0.44
fib_iter gen 3.8 3.5 8.5 0.45
scoped_resource gen 3.8 3.7 8.4 0.45
tuple_return_value gen 3.8 3.8 8.4 0.45
control_flow gen 3.9 3.9 8.4 0.47
containers gen 28.5 28.7 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 0 4 0.000
cgi gen 0 0 4 0.000
classes gen 0 0 21 0.000
gc_stack_roots gen 0 0 15 0.000
loops gen 0 0 4 0.000
tuple_return_value gen 0 4 16 0.000
modules gen 2 0 8 0.219
fib_recursive gen 4 0 12 0.300
containers gen 5 10 16 0.308
control_flow gen 4 0 8 0.512
parse gen 4 0 8 0.515
escape gen 8 8 12 0.650
varargs gen 46 50 55 0.835
files gen 4 0 4 0.899
fib_iter gen 4 0 4 0.944
length gen 8 4 8 1.026
cartesian gen 12 8 8 1.483
scoped_resource gen 8 8 0 inf
pea_hello gen NA NA 5 NA

raw benchmark files