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
fib_iter gen 8 8 944 0.008
modules gen 2 2 187 0.010
fib_recursive gen 11 11 891 0.012
loops gen 4 3 304 0.012
asdl_generated gen 11 4 389 0.029
containers gen 4 9 127 0.030
scoped_resource gen 40 46 1,030 0.039
parse gen 30 24 777 0.039
files gen 4 7 83 0.045
tuple_return_value gen 19 18 192 0.100
classes gen 3 3 27 0.120
gc_stack_roots gen 2 2 12 0.150
length gen 45 38 210 0.212
cartesian gen 79 83 340 0.233
escape gen 101 95 357 0.283
cgi gen 260 263 522 0.499
varargs gen 15 16 20 0.774
control_flow gen 209 162 116 1.807
pea_hello gen NA NA 15 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.5 4.3 12.3 0.36
gc_stack_roots gen 3.4 3.4 8.4 0.41
escape gen 3.5 3.7 8.5 0.42
fib_iter gen 3.5 3.8 8.5 0.42
modules gen 3.5 3.7 8.5 0.42
asdl_generated gen 3.7 3.7 8.5 0.43
parse gen 3.9 3.9 9.1 0.43
cartesian gen 3.7 3.5 8.4 0.44
cgi gen 3.7 3.5 8.4 0.44
length gen 3.7 3.8 8.4 0.44
scoped_resource gen 3.7 3.7 8.4 0.44
fib_recursive gen 3.8 3.8 8.5 0.45
loops gen 3.8 3.8 8.5 0.45
tuple_return_value gen 3.8 3.7 8.5 0.45
files gen 3.8 3.9 8.4 0.45
control_flow gen 3.9 3.8 8.5 0.46
containers gen 28.7 28.6 49.1 0.58
varargs gen 5.5 5.4 8.4 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
asdl_generated gen 0 7 8 0.000
classes gen 0 0 11 0.000
control_flow gen 0 0 8 0.000
fib_iter gen 0 0 4 0.000
gc_stack_roots gen 0 0 8 0.000
length gen 0 8 4 0.000
loops gen 0 0 4 0.000
modules gen 0 0 8 0.000
parse gen 0 4 16 0.000
tuple_return_value gen 0 0 8 0.000
containers gen 11 5 28 0.412
escape gen 4 8 8 0.484
varargs gen 50 49 60 0.839
scoped_resource gen 8 0 8 1.000
cgi gen 8 4 8 1.005
cartesian gen 12 4 8 1.484
files gen 4 0 0 inf
fib_recursive gen 0 0 0 NA
pea_hello gen NA NA 4 NA

raw benchmark files