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
classes gen 0 3 24 0.000
loops gen 0 0 292 0.000
fib_iter gen 8 8 916 0.008
modules gen 2 2 186 0.010
fib_recursive gen 11 11 878 0.012
asdl_generated gen 7 7 376 0.019
parse gen 29 23 767 0.038
scoped_resource gen 48 45 1,038 0.046
containers gen 11 5 111 0.102
files gen 8 8 72 0.105
tuple_return_value gen 20 18 184 0.111
gc_stack_roots gen 2 2 12 0.149
length gen 35 37 197 0.176
cartesian gen 80 83 328 0.245
escape gen 96 96 341 0.282
cgi gen 262 267 507 0.517
varargs gen 16 23 24 0.659
control_flow gen 206 152 102 2.021

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.5 10.9 0.41
scoped_resource gen 3.5 3.5 7.2 0.49
parse gen 3.8 3.7 7.5 0.51
cartesian gen 3.5 3.5 6.9 0.51
escape gen 3.5 3.5 6.9 0.51
gc_stack_roots gen 3.5 3.4 6.9 0.51
asdl_generated gen 3.7 3.5 7.1 0.52
cgi gen 3.7 3.7 6.9 0.53
fib_recursive gen 3.7 3.8 6.9 0.53
length gen 3.7 3.8 6.9 0.53
tuple_return_value gen 3.7 3.8 6.9 0.53
loops gen 3.8 3.8 7.1 0.54
fib_iter gen 3.8 3.9 6.9 0.55
files gen 3.8 3.7 6.9 0.55
modules gen 3.8 3.7 6.8 0.56
control_flow gen 3.9 3.8 6.9 0.57
containers gen 28.4 28.5 47.6 0.60
varargs gen 5.5 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name gen C++ C++-Souffle Python C++ : Python
fib_iter gen 0 0 8 0.000
fib_recursive gen 0 0 8 0.000
files gen 0 0 4 0.000
modules gen 0 0 4 0.000
parse gen 0 4 8 0.000
scoped_resource gen 0 0 4 0.000
tuple_return_value gen 0 0 8 0.000
containers gen 4 9 24 0.158
control_flow gen 4 8 12 0.343
classes gen 3 0 8 0.400
asdl_generated gen 4 4 8 0.445
loops gen 4 3 8 0.454
cgi gen 8 0 8 0.994
escape gen 8 8 8 1.011
varargs gen 51 58 47 1.071
length gen 12 8 8 1.438
cartesian gen 12 4 4 3.008
gc_stack_roots gen 0 0 0 NA

raw benchmark files