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 188 0.000
fib_iter gen 8 4 945 0.008
fib_recursive gen 11 11 885 0.012
loops gen 4 3 300 0.012
asdl_generated gen 11 11 383 0.028
containers gen 4 7 116 0.033
parse gen 26 27 776 0.034
scoped_resource gen 48 45 1,043 0.046
tuple_return_value gen 19 15 199 0.097
classes gen 3 3 31 0.103
files gen 8 7 73 0.103
length gen 37 46 218 0.172
gc_stack_roots gen 2 2 10 0.187
cartesian gen 83 79 327 0.253
escape gen 103 103 356 0.288
cgi gen 265 252 527 0.503
varargs gen 23 4 20 1.163
control_flow gen 202 156 114 1.768
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.5 0.40
modules gen 3.5 3.8 8.5 0.42
scoped_resource gen 3.5 3.7 8.5 0.42
parse gen 3.8 3.8 9.0 0.42
cartesian gen 3.7 3.5 8.5 0.43
fib_recursive gen 3.7 3.7 8.5 0.43
tuple_return_value gen 3.7 3.9 8.5 0.43
asdl_generated gen 3.7 3.7 8.4 0.44
cgi gen 3.7 3.7 8.4 0.44
loops gen 3.7 3.8 8.4 0.44
length gen 3.8 3.8 8.5 0.45
escape gen 3.7 3.7 8.1 0.45
fib_iter gen 3.8 3.7 8.4 0.45
files gen 3.8 3.5 8.4 0.45
control_flow gen 3.9 3.8 8.4 0.47
containers gen 28.5 28.7 49.2 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 12 0.000
classes gen 0 0 8 0.000
fib_iter gen 0 4 12 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 0 11 0.000
gc_stack_roots gen 0 0 10 0.000
loops gen 0 0 8 0.000
scoped_resource gen 0 0 4 0.000
tuple_return_value gen 0 4 4 0.000
modules gen 2 0 8 0.232
cgi gen 4 0 12 0.335
containers gen 11 7 28 0.409
escape gen 4 0 8 0.493
control_flow gen 4 4 8 0.513
parse gen 4 0 8 0.550
cartesian gen 8 8 12 0.691
varargs gen 42 62 60 0.710
length gen 7 0 0 inf
pea_hello gen NA NA 4 NA

raw benchmark files